SHSHSHAO
This commit is contained in:
parent
53fc1fce95
commit
78545889da
|
@ -78,8 +78,11 @@ void main()
|
|||
|
||||
float sampleDepth = imageLoad (positions, ivec2 (offsetPos.xy)).z;
|
||||
|
||||
if (sampleDepth == 0.0f)
|
||||
continue;
|
||||
|
||||
float rangeCheck = smoothstep (0.0f, 1.0f, RADIUS / abs (viewSpacePos.z - sampleDepth));
|
||||
occlusion += (sampleDepth <= samplePos.z + BIAS ? 1.0f : 0.0f) * rangeCheck;
|
||||
occlusion += (sampleDepth <= samplePos.z - BIAS ? 1.0f : 0.0f) * rangeCheck;
|
||||
//occlusion += (sampleDepth <= samplePos.z + BIAS ? 1.0f : 0.0f);
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue