Fix ambient occlusion pass not considering sky as a miss

This commit is contained in:
RaveYard 2022-06-30 15:55:13 +02:00
parent 443d447fcb
commit 04d8aabc92

View file

@ -28,7 +28,16 @@ layout(set = 0, binding = 6) buffer SurfaceBuffer { SurfaceInfo surfaces[]; };
void main() void main()
{ {
SurfaceInfo surface = surfaces[surfaceIndices[gl_PrimitiveID]];
if(surface.Sky > 0.0)
{
payload.hitAttenuation = 100000.0;
}
else
{
payload.hitAttenuation = gl_HitTEXT; payload.hitAttenuation = gl_HitTEXT;
}
} }
)glsl"; )glsl";