Use textureSampleCompare instead of textureSampleCompareLevel

This commit is contained in:
Lauri Räsänen 2023-11-05 01:17:22 +02:00
parent 091bdcaa98
commit 2616b2f5c9

View file

@ -87,13 +87,13 @@ fn sample_direct_light(index: i32, light_coords: vec4<f32>) -> f32 {
if (phase == 2 || phase == 3) { if (phase == 2 || phase == 3) {
offset.y = -offset.y; offset.y = -offset.y;
} }
let s = textureSampleCompareLevel( let s = textureSampleCompare(
t_light_depth, t_light_depth,
s_light_depth, s_light_depth,
light_local + offset, light_local + offset,
index, index,
reference_depth reference_depth
); );
total_sample += s * INV_SHADOW_SAMPLES; total_sample += s * INV_SHADOW_SAMPLES;
} }