URP管线
2022-02-16 14:53:43 16 举报
unity urp管线源码流程
作者其他创作
大纲/内容
EnqueuePass
ScriptableRenderContext
RenderPass
calls FrameCleanup for each passif rendering the last camera in stackcalls OnFinishCameraStackRendering for erery passcalls FinishRendering
BlockEventLimit
DeferredPass m_DeferredPass
OpaquePassDrawSkyboxPassTransparentPass,etc
ShaderPass
BeforeRenderingDeferredLights = 230
MainLightShadowCasterPass m_MainLightShadowCasterPass
BeforeRenderingSkybox = 350
True
Renderer
MainRenderingTransparent
AfterRenderingShadows = 100
Submit
Reset shader time as they were overridden in SetupCameraProperties
BlockRange
kScriptRenderCommand_DrawPreImageEffectsGizmos
False
CPU
SortCameras
ScriptableRenderPass
1
BeforeRenderingGbuffer = 210
RenderCameraStack
AfterRenderingPostProcessing = 600
BeforeRenderingPostProcessing = 550
context.Cull
CapturePass m_CapturePass
SetPerCameraBillboardProperties
isStackedRendering?
MotionVectorRenderPass m_MotionVectorPass
结束
RenderingCommandBuffer.bindings
InitializeCameraData
开始
kScriptRenderCommand_SetupCameraProperties
TryGetCullingParameters
CopyDepthPass m_PrimedDepthCopyPass
GBufferPass m_GBufferPass
SetupCameraProperties
Always 0
BeforeRenderingPrePasses = 150
Execute AfterRendering Block
UniversalRenderPipelineAsset
FinalBlitPass m_FinalBlitPass
SetCameraMatrices
CommandBuffer
renderer.Setup
Opaque
kScriptRenderCommand_DrawShadows
AfterRenderingSkybox = 400
ShadowCaster
BeforeRenderingTransparents = 450
m_Commands
true
kScriptRenderCommand_BeginSubPass
InternalStartRendering
MainRenderingOpaque
ScriptableRendererFeature
Execute Before Rendering Block
kScriptRenderCommand_DrawSkybox
ExecuteCommand
URP
ScriptableRenderCommandType
UpdateVolumeFramework
AfterRenderingOpaques = 300
AddXXXCommandToBuffer
delegate
RenderSingleCamera(Base)
stable sort by passEvent
SetupPerFrameShaderConstants
Reset per-camera shader keywords
isStackedRenderinganyPostProcessingEnabled
Overlay?
m_DrawShadowCommands
renderer.Clear
AdditionalLightsShadowCasterPass m_AdditionalLightsShadowCasterPass
MaxValue
kScriptRenderCommand_StereoSetupCameraProperties
Calls OnCameraSetup for each scriptablePass
PostProcessPass postProcessPass
SortRenderPass
Calls per renderFeature
m_CommandBuffers
kScriptRenderCommand_BeginRenderPass
Skybox
kScriptRenderCommand_EndSubPass
ScriptableRenderer
ClearRenderingState
TileDepthRangePass m_TileDepthRangePass
Calls OnCameraPreCull for each renderfeature
0
2
Pass
End
kScriptRenderCommand_StereoEndRender
RenderingCommandBuffer
kScriptRenderCommand_DrawRenderers
Data
AfterRenderingGbuffer = 220
CopyDepthPass m_GBufferCopyDepthPass
BeforeRendering = 0
RenderSingleCamera(Overlay)
Check
DrawSkyboxPass m_DrawSkyboxPass
C++
AfterRendering
3
PassQueue.Count
kScriptRenderCommand_StartMultiEye
kScriptRenderCommand_InvokeOnRenderObjectCallbacks
InternalFinishRendering
TileDepthRangePass m_TileDepthRangeExtraPass
isLast?
DrawObjectsPass m_RenderTransparentForwardPass
BeforeRenderingShadows = 50
Start RenderCameraStack
4
IEquatable
SetupNativeRenderPassFrameData
m_Cameras
kScriptRenderCommand_StopMultiEye
RenderPipeline
Pipeline
InitializeLightDataInitializeShadowDataInitializePostProcessingData
need add specific pass to queue?
Execute Transparent Block
BeforeRenderingOpaques = 250
CopyColorPass m_CopyColorPass
m_Buffer
FillRenderBlock
renderer.OnPreCullRenderPasses
BeginCameraRendering
kScriptRenderCommandCount
SetShaderTimeValues
RenderSingleCamera
UniversalRenderer
CopyDepthPass m_CopyDepthPass
TransparentSettingsPass m_TransparentSettingsPass
renderer.SetupCullingParameters
endContextRendering
Object
kScriptRenderCommand_EndRenderPass
renderer.Execute
ExecuteCommandBuffer
PostProcessPass finalPostProcessPass
Configure the render passes that will execute for this renderer.This method is called per-camera every frame.
SetupLights
AddRenderPasses
Clear(m_Buffer.m_size = 0)
AfterRenderingDeferredLights = 240
UniversalRenderPipeline
IDisposable
Execute Opaque Block
AfterRenderingTransparents = 500
GPU
RenderPipelineAsset
CleanupLightData
DrawObjectsPass m_RenderOpaqueForwardOnlyPass
PostProcessing
InitializeRenderingData
DepthOnlyPass m_DepthPrepass
AfterRenderingPrePasses = 200
m_CleanupCullResults
kScriptRenderCommand_ExecuteCommandBufferAsync
AfterRendering = 1000
DrawObjectsPass m_RenderOpaqueForwardPass
ScriptableObject
ColorGradingLutPass colorGradingLutPass
BeforeRendering
Container
BeginContextRendering
InitializeAdditionalCameraData
SetPerCameraClippingPlaneProperties
Transparent
SetPerCameraShaderVariables
kScriptRenderCommand_ExecuteCommandBuffer
GameCamera?
DepthNormalOnlyPass m_DepthNormalPrepass
m_DrawRenderersCommands
EndCameraRendering
InvokeOnRenderObjectCallbackPass m_OnRenderObjectCallbackPass
ISerializationCallbackReceiver
C#
kScriptRenderCommand_DrawPostImageEffectsGizmos
Gbuffer/Deffered Shading
0 条评论
下一页