Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #206 from huangdonghai/v1
Browse files Browse the repository at this point in the history
fix dx9 shader model 3 linear rendering DoF bug
  • Loading branch information
Chman committed Jun 23, 2017
2 parents bb568c4 + d0239ff commit aa6aee4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit aa6aee4

Please sign in to comment.