summaryrefslogtreecommitdiff
path: root/workspaces
diff options
context:
space:
mode:
Diffstat (limited to 'workspaces')
-rw-r--r--workspaces/main/shaders/scene1.wgsl4
1 files changed, 3 insertions, 1 deletions
diff --git a/workspaces/main/shaders/scene1.wgsl b/workspaces/main/shaders/scene1.wgsl
index b0ec2ab..7af3811 100644
--- a/workspaces/main/shaders/scene1.wgsl
+++ b/workspaces/main/shaders/scene1.wgsl
@@ -246,7 +246,9 @@ fn effect(p: vec2<f32>) -> vec3<f32> {
}
@fragment fn fs_main(@builtin(position) p: vec4<f32>) -> @location(0) vec4<f32> {
- let q = p.xy / uniforms.resolution;
+ // Flip Y to match ShaderToy convention (origin at bottom-left)
+ let flipped = vec2<f32>(p.x, uniforms.resolution.y - p.y);
+ let q = flipped / uniforms.resolution;
var coord = -1.0 + 2.0 * q;
coord.x *= uniforms.resolution.x / uniforms.resolution.y;
var col = effect(coord);