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

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