@@ -13,12 +13,22 @@ class TempPassData { };
1313 // Needed only because of custom pass. See comment at ResolveMSAAColor.
1414 TextureHandle m_NonMSAAColorBuffer ;
1515
16+ private void BeginRenderGraph ( ScriptableRenderContext renderContext , CommandBuffer commandBuffer )
17+ {
18+ var renderGraphParams = new RenderGraphParameters ( )
19+ {
20+ scriptableRenderContext = renderContext ,
21+ commandBuffer = commandBuffer ,
22+ currentFrameIndex = m_FrameCount
23+ } ;
24+
25+ m_RenderGraph . Begin ( renderGraphParams ) ;
26+ }
27+
1628 void ExecuteWithRenderGraph ( RenderRequest renderRequest ,
1729 AOVRequestData aovRequest ,
1830 List < RTHandle > aovBuffers ,
19- List < RTHandle > aovCustomPassBuffers ,
20- ScriptableRenderContext renderContext ,
21- CommandBuffer commandBuffer )
31+ List < RTHandle > aovCustomPassBuffers )
2232 {
2333 var hdCamera = renderRequest . hdCamera ;
2434 var camera = hdCamera . camera ;
@@ -27,15 +37,6 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest,
2737 bool msaa = hdCamera . frameSettings . IsEnabled ( FrameSettingsField . MSAA ) ;
2838 var target = renderRequest . target ;
2939
30- var renderGraphParams = new RenderGraphParameters ( )
31- {
32- scriptableRenderContext = renderContext ,
33- commandBuffer = commandBuffer ,
34- currentFrameIndex = m_FrameCount
35- } ;
36-
37- m_RenderGraph . Begin ( renderGraphParams ) ;
38-
3940 // We need to initalize the MipChainInfo here, so it will be available to any render graph pass that wants to use it during setup
4041 // Be careful, ComputePackedMipChainInfo needs the render texture size and not the viewport size. Otherwise it would compute the wrong size.
4142 m_DepthBufferMipChainInfo . ComputePackedMipChainInfo ( RTHandles . rtHandleProperties . currentRenderTargetSize ) ;
@@ -283,7 +284,7 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest,
283284 }
284285 PushFullScreenExposureDebugTexture ( m_RenderGraph , postProcessDest ) ;
285286
286- ResetCameraSizeForAfterPostProcess ( m_RenderGraph , hdCamera , commandBuffer ) ;
287+ ResetCameraSizeForAfterPostProcess ( m_RenderGraph , hdCamera ) ;
287288
288289 RenderCustomPass ( m_RenderGraph , hdCamera , postProcessDest , prepassOutput , customPassCullingResults , CustomPassInjectionPoint . AfterPostProcess , aovRequest , aovCustomPassBuffers ) ;
289290
@@ -338,15 +339,6 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest,
338339 RenderGizmos ( m_RenderGraph , hdCamera , colorBuffer , GizmoSubset . PostImageEffects ) ;
339340
340341 m_RenderGraph . Execute ( ) ;
341-
342- if ( aovRequest . isValid )
343- {
344- // aovRequest.Execute don't go through render graph for now
345- using ( new ProfilingScope ( commandBuffer , ProfilingSampler . Get ( HDProfileId . AOVExecute ) ) )
346- {
347- aovRequest . Execute ( commandBuffer , aovBuffers , aovCustomPassBuffers , RenderOutputProperties . From ( hdCamera ) ) ;
348- }
349- }
350342 }
351343
352344 class FinalBlitPassData
@@ -947,7 +939,7 @@ TextureHandle RenderTransparency(RenderGraph renderGraph,
947939 // TODO RENDERGRAPH: Remove this when we properly convert custom passes to full render graph with explicit color buffer reads.
948940 // To allow users to fetch the current color buffer, we temporarily bind the camera color buffer
949941 SetGlobalColorForCustomPass ( renderGraph , colorBuffer ) ;
950- RenderCustomPass ( m_RenderGraph , hdCamera , colorBuffer , prepassOutput , customPassCullingResults , CustomPassInjectionPoint . BeforePreRefraction , aovRequest , aovCustomPassBuffers ) ;
942+ RenderCustomPass ( renderGraph , hdCamera , colorBuffer , prepassOutput , customPassCullingResults , CustomPassInjectionPoint . BeforePreRefraction , aovRequest , aovCustomPassBuffers ) ;
951943 SetGlobalColorForCustomPass ( renderGraph , currentColorPyramid ) ;
952944
953945 // Render pre-refraction objects
@@ -960,7 +952,7 @@ TextureHandle RenderTransparency(RenderGraph renderGraph,
960952 }
961953
962954 // We don't have access to the color pyramid with transparent if rough refraction is disabled
963- RenderCustomPass ( m_RenderGraph , hdCamera , colorBuffer , prepassOutput , customPassCullingResults , CustomPassInjectionPoint . BeforeTransparent , aovRequest , aovCustomPassBuffers ) ;
955+ RenderCustomPass ( renderGraph , hdCamera , colorBuffer , prepassOutput , customPassCullingResults , CustomPassInjectionPoint . BeforeTransparent , aovRequest , aovCustomPassBuffers ) ;
964956
965957 // Render all type of transparent forward (unlit, lit, complex (hair...)) to keep the sorting between transparent objects.
966958 RenderForwardTransparent ( renderGraph , hdCamera , colorBuffer , normalBuffer , prepassOutput , vtFeedbackBuffer , volumetricLighting , ssrLightingBuffer , currentColorPyramid , lightLists , shadowResult , cullingResults , false ) ;
@@ -1581,7 +1573,7 @@ class ResetCameraSizeForAfterPostProcessPassData
15811573 public ShaderVariablesGlobal shaderVariablesGlobal ;
15821574 }
15831575
1584- void ResetCameraSizeForAfterPostProcess ( RenderGraph renderGraph , HDCamera hdCamera , CommandBuffer commandBuffer )
1576+ void ResetCameraSizeForAfterPostProcess ( RenderGraph renderGraph , HDCamera hdCamera )
15851577 {
15861578 if ( DynamicResolutionHandler . instance . DynamicResolutionEnabled ( ) )
15871579 {
0 commit comments