Skip to content

Commit

Permalink
Fix whitespaces in shader
Browse files Browse the repository at this point in the history
  • Loading branch information
eliemichel committed Nov 12, 2024
1 parent cfb4d1d commit 9ce8a56
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions resources/shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ struct VertexOutput {

@vertex
fn vs_main(in: VertexInput) -> VertexOutput {
var out: VertexOutput;
let ratio = 640.0 / 480.0;
var out: VertexOutput;
let ratio = 640.0 / 480.0;

// We now move the scene depending on the time!
var offset = vec2f(-0.6875, -0.463);
offset += 0.3 * vec2f(cos(uTime), sin(uTime));
// We now move the scene depending on the time!
var offset = vec2f(-0.6875, -0.463);
offset += 0.3 * vec2f(cos(uTime), sin(uTime));

out.position = vec4f(in.position.x + offset.x, (in.position.y + offset.y) * ratio, 0.0, 1.0);
out.color = in.color;
return out;
out.position = vec4f(in.position.x + offset.x, (in.position.y + offset.y) * ratio, 0.0, 1.0);
out.color = in.color;
return out;
}

@fragment
Expand Down

0 comments on commit 9ce8a56

Please sign in to comment.