diff --git a/data/shaders/glsl/raytracingshadows/closesthit.rchit b/data/shaders/glsl/raytracingshadows/closesthit.rchit index 25079bdf..7026fcab 100644 --- a/data/shaders/glsl/raytracingshadows/closesthit.rchit +++ b/data/shaders/glsl/raytracingshadows/closesthit.rchit @@ -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; } -} +} \ No newline at end of file diff --git a/data/shaders/glsl/raytracingshadows/closesthit.rchit.spv b/data/shaders/glsl/raytracingshadows/closesthit.rchit.spv index 486571c5..6b84f0a0 100644 Binary files a/data/shaders/glsl/raytracingshadows/closesthit.rchit.spv and b/data/shaders/glsl/raytracingshadows/closesthit.rchit.spv differ diff --git a/data/shaders/hlsl/raytracingshadows/closesthit.rchit b/data/shaders/hlsl/raytracingshadows/closesthit.rchit index 4408f55c..6dba8bc9 100644 --- a/data/shaders/hlsl/raytracingshadows/closesthit.rchit +++ b/data/shaders/hlsl/raytracingshadows/closesthit.rchit @@ -78,7 +78,7 @@ void main(in InPayload inPayload, inout InOutPayload inOutPayload, in float2 att inOutPayload.shadowed = true; // Offset indices to match shadow hit/miss index - TraceRay(topLevelAS, RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH | RAY_FLAG_FORCE_OPAQUE | RAY_FLAG_SKIP_CLOSEST_HIT_SHADER, 0xff, 1, 0, 1, rayDesc, inOutPayload); + TraceRay(topLevelAS, RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH | RAY_FLAG_FORCE_OPAQUE | RAY_FLAG_SKIP_CLOSEST_HIT_SHADER, 0xff, 0, 0, 1, rayDesc, inOutPayload); if (inOutPayload.shadowed) { inPayload.hitValue *= 0.3; } diff --git a/data/shaders/hlsl/raytracingshadows/closesthit.rchit.spv b/data/shaders/hlsl/raytracingshadows/closesthit.rchit.spv index 225df975..983aafe1 100644 Binary files a/data/shaders/hlsl/raytracingshadows/closesthit.rchit.spv and b/data/shaders/hlsl/raytracingshadows/closesthit.rchit.spv differ