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

Commit caa8ceb

Browse files
committed
Fixed CopyTexture error with SSR
1 parent 72f42c2 commit caa8ceb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88

99
### Fixed
1010
- Potential fp16 overflow in Depth of Field that could cause NaN on some platforms.
11+
- Error with Screen-space Reflections when HDR is disabled.
1112

1213
## [2.1.7] - 2019-06-12
1314

PostProcessing/Runtime/Effects/ScreenSpaceReflections.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ public override void Render(PostProcessRenderContext context)
266266

267267
var compute = context.resources.computeShaders.gaussianDownsample;
268268
int kernel = compute.FindKernel("KMain");
269+
var mipFormat = RuntimeUtilities.defaultHDRRenderTextureFormat;
269270

270271
var last = new RenderTargetIdentifier(m_Resolve);
271272

@@ -274,7 +275,7 @@ public override void Render(PostProcessRenderContext context)
274275
size >>= 1;
275276
Assert.IsTrue(size > 0);
276277

277-
cmd.GetTemporaryRT(m_MipIDs[i], size, size, 0, FilterMode.Bilinear, context.sourceFormat, RenderTextureReadWrite.Default, 1, true);
278+
cmd.GetTemporaryRT(m_MipIDs[i], size, size, 0, FilterMode.Bilinear, mipFormat, RenderTextureReadWrite.Default, 1, true);
278279
cmd.SetComputeTextureParam(compute, kernel, "_Source", last);
279280
cmd.SetComputeTextureParam(compute, kernel, "_Result", m_MipIDs[i]);
280281
cmd.SetComputeVectorParam(compute, "_Size", new Vector4(size, size, 1f / size, 1f / size));

0 commit comments

Comments
 (0)