private void GetGlowTexture(PostProcessRenderContext context) { Vector2Int resolution = settings.textureResolution; EZPostProcessingUtility.GetTexture(ref glowDepthTexture, resolution, 16, RenderTextureFormat.Depth); EZPostProcessingUtility.CopyCameraSettings(context.camera, glowCamera, settings.sourceLayer, DepthTextureMode.Depth); glowCamera.targetTexture = glowDepthTexture; glowCamera.Render(); }
private void GetDistortionTexture(PostProcessRenderContext context) { Vector2Int resolution = settings.textureResolution; EZPostProcessingUtility.GetTexture(ref distortionTex, resolution, 0, settings.textureFormat); if (settings.depthTest) { EZPostProcessingUtility.GetTexture(ref distortionDepthTex, resolution, 16, RenderTextureFormat.Depth); EZPostProcessingUtility.CopyCameraSettings(context.camera, distortionCamera, settings.sourceLayer, DepthTextureMode.Depth); distortionCamera.SetTargetBuffers(distortionTex.colorBuffer, distortionDepthTex.depthBuffer); } else { EZPostProcessingUtility.CopyCameraSettings(context.camera, distortionCamera, settings.sourceLayer, DepthTextureMode.None); distortionCamera.targetTexture = distortionTex; } distortionCamera.Render(); }