Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PostProcessing/Runtime/Components/DepthOfFieldComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion PostProcessing/Runtime/Utils/RenderTextureFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down