diff --git a/PostProcessing/Runtime/Components/DepthOfFieldComponent.cs b/PostProcessing/Runtime/Components/DepthOfFieldComponent.cs index 694888c4..d09643c8 100644 --- a/PostProcessing/Runtime/Components/DepthOfFieldComponent.cs +++ b/PostProcessing/Runtime/Components/DepthOfFieldComponent.cs @@ -105,7 +105,7 @@ public void Prepare(RenderTexture source, Material uberMaterial, bool antialiasC material.SetFloat(Uniforms._RcpAspect, 1f / aspect); // CoC calculation pass - var rtCoC = context.renderTextureFactory.Get(context.width, context.height, 0, cocFormat); + var rtCoC = context.renderTextureFactory.Get(context.width, context.height, 0, cocFormat, RenderTextureReadWrite.Linear); Graphics.Blit(null, rtCoC, material, 0); if (antialiasCoC) diff --git a/PostProcessing/Runtime/Utils/RenderTextureFactory.cs b/PostProcessing/Runtime/Utils/RenderTextureFactory.cs index d51bf6c0..a3864732 100644 --- a/PostProcessing/Runtime/Utils/RenderTextureFactory.cs +++ b/PostProcessing/Runtime/Utils/RenderTextureFactory.cs @@ -27,7 +27,7 @@ public RenderTexture Get(RenderTexture baseRenderTexture) public RenderTexture Get(int width, int height, int depthBuffer = 0, RenderTextureFormat format = RenderTextureFormat.ARGBHalf, RenderTextureReadWrite rw = RenderTextureReadWrite.Default, FilterMode filterMode = FilterMode.Bilinear, TextureWrapMode wrapMode = TextureWrapMode.Clamp, string name = "FactoryTempTexture") { - var rt = RenderTexture.GetTemporary(width, height, depthBuffer, format); + var rt = RenderTexture.GetTemporary(width, height, depthBuffer, format, rw); // add forgotten param rw rt.filterMode = filterMode; rt.wrapMode = wrapMode; rt.name = name;