Fix stb record offset

Fixes #1018
This commit is contained in:
Sascha Willems 2023-03-24 20:10:54 +01:00
parent 02569bf4ae
commit 5c6cec4a62
4 changed files with 3 additions and 3 deletions

View file

@ -68,8 +68,8 @@ void main()
vec3 origin = gl_WorldRayOriginEXT + gl_WorldRayDirectionEXT * gl_HitTEXT;
shadowed = true;
// Trace shadow ray and offset indices to match shadow hit/miss shader group indices
traceRayEXT(topLevelAS, gl_RayFlagsTerminateOnFirstHitEXT | gl_RayFlagsOpaqueEXT | gl_RayFlagsSkipClosestHitShaderEXT, 0xFF, 1, 0, 1, origin, tmin, lightVector, tmax, 2);
traceRayEXT(topLevelAS, gl_RayFlagsTerminateOnFirstHitEXT | gl_RayFlagsOpaqueEXT | gl_RayFlagsSkipClosestHitShaderEXT, 0xFF, 0, 0, 1, origin, tmin, lightVector, tmax, 2);
if (shadowed) {
hitValue *= 0.3;
}
}
}