/ToyRenderPipeline

Custom deferred render pipeline with Unity SRP(Scriptable Render Pipeline)

Primary LanguageC#

ToyRenderPipeline

Custom Render Pipeline with Unity SRP(Scriptable Render Pipeline)including various of popular graphic features

Gallery

Physical Based Rendering(PBR)and Image Based Lighting(IBL):

image-20220118141514668

Cascaded Shadow Mapping(CSM)and Soft Shadow(PCSS):

image-20220127123312138

Cluster Based Light:

image-20220205133758498

GPU Based(frustum& Hi-Z occlusion)Culling using compute shader:

image-20220320173042983

Features

  • Deferred Shadings Pipeline
  • Physical Based Rendering(PBR,direct light)
  • Image Based Lighting(IBL,ambient light)
  • glTF Material support
  • Cascaded Shadow Mapping(CSM)
  • PCSS soft shadow
  • Cluster Based Deferred Lighting
  • GPU Based Culling(Frustum & Occlusion)

Environment

  • Unity 2021.2,win 11,DX 11
  • UniGLTF package(alternative,you can config material in Unity Inspector)
  • MRT supporting GPU

Usage

  • Menu Create > RenderPipeline > ToyRenderPipeline,create a pipeline asset
  • Menu Edit > Project Settings > Graphics,select the custom pipeline
  • Bind ToyRP/gbuffer shader to all materials

image-20220323161842640

Compare With Unity

Using some tricks trying to align the rendering result to Unity Build-in Pipeline,left column is IBL effect,while right is direction light

image-20220118142219780

Todo

  • Screen Space Effect
  • Volumn Effect
  • Post Process

Reference

[1] JoeyDeVries, "Learn OpenGL"

[2] 王江荣, "【Unity】SRP简单入门"

[3] 銀葉吉祥, "一起来写Unity渲染管线吧!"

[4] MaxwellGeng, "在Unity里写一个纯手动的渲染管线"

[5] Catlike Coding, "Custom Render Pipeline"

[6] Unity Manual, "Scriptable Render Pipeline"

[7] 郭大钦, "unity build-in管线中的PBR材质Shader分析研究"

[8] 雨轩, "Unity PBR Standard Shader 实现详解"

[9] taecg, "零基础入门Unity Shader"

[10] Tim Cooper, "Scriptable Render Pipeline Overview"

[11] LetMe_See, "Unity中的CommandBuffer"

[12] EA DICE, "Moving Frostbite to PBR"

[13] cinight, "CustomSRP"

[14] moriya苏蛙可, "DX12渲染管线(1) - 基于物理的渲染(PBR)"

[15] pema99, "shader-knowledg"

[16] dariomanesku, "cmftStudio"

[17] BugRunner, "Cascaded Shadow Map(CSM)中的一些问题"

[18] YOung, "Unity实时阴影实现——Screen Space Shadow Mapping"

[19] YOung, "Unity实时阴影实现——Cascaded Shadow Mapping"

[20] richbabe, "Unity实现Shadow Map"

[21] Frostbite, "Shadows & Decals: D3D10 techniques from Frostbite"

[22] Microsoft DX Doc, "Cascaded Shadow Maps"

[23] Microsoft DX Doc, "Common Techniques to Improve Shadow Depth Maps"

[24] Catlike Coding, "Directional Shadows Cascaded Shadow Maps"

[25] 宋开心, "用DX11实现Cascaded shadow map"

[26] opengl-tutorial, "Tutorial 16 : Shadow mapping"

[27] NVIDIA, "Percentage-Closer Soft Shadows"

[28] Vilem Otte, "Effect: Area Light Shadows Part 1: PCSS"

[29] kakaroto, "实时渲染|Shadow Map:PCF、PCSS、VSM、MSM"

[30] John R. Isidoro, "Shadow Mapping: GPU-based Tips and Techniques"

[31] Kevin Myers, "Integrating Realistic Soft Shadows into Your Game Engine"

[32] TheMasonX, "UnityPCSS"

[33] xiaOp, "实时阴影技术总结"

[34] 闫令琪老师, “GAMES202-高质量实时渲染”