diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-08 09:13:57 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-08 09:13:57 +0100 |
| commit | 9d114ae4fec465baed381de7782ef42ca77e734b (patch) | |
| tree | 45483faf97e91f6c97848fd4e6e7723bb0de153e /src/shaders/combined_postprocess.wgsl | |
| parent | fa0beb7cc3e4ab9edfd123933fd205053dc3ac31 (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'src/shaders/combined_postprocess.wgsl')
| -rw-r--r-- | src/shaders/combined_postprocess.wgsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shaders/combined_postprocess.wgsl b/src/shaders/combined_postprocess.wgsl index c0acfe7..7402284 100644 --- a/src/shaders/combined_postprocess.wgsl +++ b/src/shaders/combined_postprocess.wgsl @@ -11,7 +11,7 @@ @fragment fn fs_main(in: VertexOutput) -> @location(0) vec4f { // Sample base color - var color = textureSample(input_texture, input_sampler, in.uv); + var color = textureSampleYUp(input_texture, input_sampler, in.uv); // Apply effects in sequence (customize as needed) // color = apply_solarize(color, 0.4, 0.4, uniforms.time); |
