@@ -151,6 +151,8 @@ public bool shaderPropertiesAreDirty
151151
152152 ShaderVariablesGlobal m_ShaderVariablesGlobalCB = new ShaderVariablesGlobal ( ) ;
153153
154+ int m_RecorderTempRT = Shader . PropertyToID ( "TempRecorder" ) ;
155+
154156 static private CompositionManager s_CompositorInstance ;
155157
156158 // Built-in Color.black has an alpha of 1, so defien here a fully transparent black
@@ -824,14 +826,14 @@ void CustomRender(ScriptableRenderContext context, HDCamera camera)
824826 if ( recorderCaptureActions != null )
825827 {
826828 m_ShaderVariablesGlobalCB . _ViewProjMatrix = m_ViewProjMatrixFlipped ;
827- cmd . SetInvertCulling ( true ) ;
828829 ConstantBuffer . PushGlobal ( cmd , m_ShaderVariablesGlobalCB , HDShaderIDs . _ShaderVariablesGlobal ) ;
829- cmd . Blit ( null , BuiltinRenderTextureType . CameraTarget , m_Material , m_Material . FindPass ( "ForwardOnly" ) ) ;
830+ var format = m_InputLayers [ 0 ] . GetRenderTarget ( ) . format ;
831+ cmd . GetTemporaryRT ( m_RecorderTempRT , camera . camera . pixelWidth , camera . camera . pixelHeight , 0 , FilterMode . Point , format ) ;
832+ cmd . Blit ( null , m_RecorderTempRT , m_Material , m_Material . FindPass ( "ForwardOnly" ) ) ;
830833 for ( recorderCaptureActions . Reset ( ) ; recorderCaptureActions . MoveNext ( ) ; )
831834 {
832- recorderCaptureActions . Current ( BuiltinRenderTextureType . CameraTarget , cmd ) ;
835+ recorderCaptureActions . Current ( m_RecorderTempRT , cmd ) ;
833836 }
834- cmd . SetInvertCulling ( false ) ;
835837 }
836838
837839 // When we render directly to game view, we render the image flipped up-side-down, like other HDRP cameras
0 commit comments