Get light pos directly from matrices, debugging shadowmaps

This commit is contained in:
Lauri Räsänen 2023-11-04 18:15:11 +02:00
parent 2dc20ad12c
commit 5e0001e2e1
4 changed files with 49 additions and 20 deletions

View file

@ -13,5 +13,5 @@ fn vs_main(
);
let world_position = model_matrix * vec4<f32>(model.position, 1.0);
return light.matrices[light_matrix_index] * (world_position - vec4<f32>(light.position, 0.0));
return light.matrices[light_matrix_index] * world_position;
}