Home

Awesome

CustomSRP

A new SRP from scratch

Unity version : 2023.1.0b17+ Checkout to branches for older versions

Tested with : Win DX11

SceneImageDescription
SRP0101_BasicSuper basic SRP that renders unlit material objects
SRP0102_AssetSettingsLet the SRP Asset to pass some custom variables
SRP0103_CustomGUIHave a proper interface for the SRP Asset
SRP0201_FrustumCullingFrustum culling always work. This is a test scene to verify the culling results
SRP0202_OcclusionCullingBaked Occlusion Culling always work also. This is just a test scene to verify it
SRP0301_BatchingUse Static Batching, Dynamic Batching, GPU Instancing and SRP Batcher
SRP0401_NoSpecificPassTo draw the shaders that do not have a tag, e.g. default Unlit shaders
SRP0402_MultipassIn SRP we need to specify the pass names, so no more infinite pass. But we can specify the orders of passes
SRP0403_ComputeUse compute shader to achieve simple edge detection
SRP0404_DrawCommandsusing CommandBuffer functions (DrawMeshInstancedIndirect)
SRP0405_CallbackMake your custom callback function so that you can insert extra rendering code with other scripts
SRP0406_ShaderDebugPrintPrint pixel values from shader to Console
SRP0501_SoftParticleSetup CameraDepthTexture to achieve soft-particle effect
SRP0502_DistortionNo more grab pass but we can implement our own
SRP0101_FogUse Fog on Lighting Settings
SRP0601_RealtimeLightsDirectional / Point / Spot lights and setup PerObject light data
SRP0602_BakedLightsBaked Lightmap / Reflection Probe / Light Probes and setup PerObject data for them
SRP0603_RealtimeShadowDirectionalDirectional light realtime shadow
SRP0701_HDR_MSAAUse HDR and MSAA
SRP0701_HDR_MSAA_RTHandleSame as above, but using RTHandle instead of RenderTargetIdentifier
SRP0701_StencilIn order to use stencil, we need the render target having at least 24bit depth. This case we use the same pipeline with 0701
SRP0702_PostprocessingThis shows you how to use Postprocessing Stack with SRP (transparent effects e.g. Bloom, Depth of Field)
SRP0703_MotionVectorMake motion blur works. Use per-object and camera motion vector
SRP0801_UGUIUse UICamera to render UGUI, also render 3D objects and particle on UI
SRP0802_RenderPassUse RenderPass to target multiple color attachments and read / write from / to them
SRP0802_RenderGraphUse RenderGraph to modularize rendering passes. Use Window > Render Pipeline > Render Graph Viewer to see RT read/write status in each pass
SRP0802_RenderGraph_RasterCommandBufferSimilar to above but using RasterCommandBuffer in RenderGraph
SRP0803_MultiRenderTargetUse CommandBuffer.SetRenderTarget() to target multiple color surfaces
SRP0901_SceneViewFixMake the gizmos / icons appear on scene view
SRP0902_SceneViewDrawModeAdding custom Scene View draw modes
SRP1001_ErrorRender the pink shaders on the materials that the SRP doesn't support
SRP1002_DebugMake the Profiler records the timing for SRP performance debugging
SRP1003_DefaultShadersSet pipeline default materials when creating new material / objects / particle / terrain etc

References / Useful Links: