From 9d114ae4fec465baed381de7782ef42ca77e734b Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 8 Mar 2026 09:13:57 +0100 Subject: fix(shaders): enforce y-up screen-space convention + document coordinate conventions - Add textureSampleYUp() helper to fullscreen_uv_vs.wgsl to correct y-flip when sampling WebGPU textures with y-up UV coordinates - Use textureSampleYUp() in passthrough, gaussian_blur, combined_postprocess - Fix skybox.wgsl: remove erroneous (1.0 - uv.y) flip (double-flip bug) - Document world/view/screen conventions in doc/3D.md, camera_common.wgsl, and fullscreen_uv_vs.wgsl Co-Authored-By: Claude Sonnet 4.6 --- src/shaders/passthrough.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shaders/passthrough.wgsl') diff --git a/src/shaders/passthrough.wgsl b/src/shaders/passthrough.wgsl index bce377c..90ba08b 100644 --- a/src/shaders/passthrough.wgsl +++ b/src/shaders/passthrough.wgsl @@ -7,5 +7,5 @@ @group(0) @binding(2) var uniforms: UniformsSequenceParams; @fragment fn fs_main(in: VertexOutput) -> @location(0) vec4f { - return textureSample(input_texture, input_sampler, in.uv); + return textureSampleYUp(input_texture, input_sampler, in.uv); } -- cgit v1.2.3