void RenderAndReadbackAOVCapture(RecordingSession session) { var pipeline = RenderPipelineManager.currentPipeline as HDRenderPipeline; var aovRecorderSettings = session.settings as AOVRecorderSettings; if (aovRecorderSettings != null) { TargetCamera.Render(); RenderTexture.active = OutputRenderTexture; ReadbackTexture.ReadPixels(new Rect(0, 0, OutputWidth, OutputHeight), 0, 0, false); ReadbackTexture.Apply(); RenderTexture.active = null; } }
void ReadbackAOVCapture(RecordingSession session) { var aovRecorderSettings = session.settings as AOVRecorderSettings; if (aovRecorderSettings != null) { if (ReadbackTexture == null) { ReadbackTexture = new Texture2D(OutputWidth, OutputHeight, TextureFormat.RGBAFloat, false, aovRecorderSettings.CaptureHDR); } RenderTexture.active = m_TempRT; ReadbackTexture.ReadPixels(new Rect(0, 0, OutputWidth, OutputHeight), 0, 0, false); ReadbackTexture.Apply(); RenderTexture.active = null; } }