Fix depth texture saving

This commit is contained in:
Lauri Räsänen 2023-04-15 14:32:06 +03:00
parent 010e4dedeb
commit 7830d735b8
6 changed files with 131 additions and 82 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;
return light.matrices[light_matrix_index] * (world_position - vec4<f32>(light.position, 0.0));
}