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

Commit adf2aad

Browse files
authored
Merge pull request #289 from gokselgoktas/v2
Fix reflection leaks caused by inverted tracer rays
2 parents 690eb02 + 4881328 commit adf2aad

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

PostProcessing/Shaders/Builtins/ScreenSpaceReflections.hlsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ float4 FragTest(VaryingsDefault i) : SV_Target
262262

263263
ray.direction = normalize(reflect(normalize(ray.origin), normal));
264264

265+
if (ray.direction.z > 0.)
266+
return 0.0;
267+
265268
Result result = March(ray, i);
266269

267270
float confidence = (float)result.iterationCount / (float)_MaximumIterationCount;

0 commit comments

Comments
 (0)