From 1691ab8df2bf620df50e52012d0a0ae85faa7d77 Mon Sep 17 00:00:00 2001 From: Ewan Breakey Date: Mon, 3 Jun 2024 01:11:42 +1000 Subject: [PATCH] Use `view.view_proj` for world projection (#4) --- src/render/lighting/lighting.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/lighting/lighting.wgsl b/src/render/lighting/lighting.wgsl index ddf9235..9d46c5e 100644 --- a/src/render/lighting/lighting.wgsl +++ b/src/render/lighting/lighting.wgsl @@ -65,7 +65,7 @@ fn fragment(vo: FullscreenVertexOutput) -> @location(0) vec4 { // it to screen space in order to do things like compute distances (let // alone render it in the correct place). let point_light_screen_center = - world_to_screen(point_light.center, view.viewport.zw, view.projection); + world_to_screen(point_light.center, view.viewport.zw, view.view_proj); // Compute the distance between the current position and the light's center. // We multiply by the scale factor as otherwise our distance will always be