Skip to content

Commit

Permalink
use different scale
Browse files Browse the repository at this point in the history
  • Loading branch information
jannik4 committed Aug 16, 2024
1 parent 05a9c97 commit 0c2a703
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions assets/shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn vertex(vertex: Vertex) -> VertexOutput {

let prime = f32(vertex.i_prime);

let scale = (0.2 + (sin(2.0 * time + prime * 0.1) + 1.0) / 2.0) * zoom_scale() * (1.0 + 0.0000001 * prime);
let scale = 0.1 * (0.2 + (sin(2.0 * time + prime * 0.1) + 1.0) / 2.0) * zoom_scale() * (1.0 + 0.0000001 * prime);
let color = vec4<f32>(
gamma_function(1.5 + 0.5 * (sin(1.0 * time + prime * 0.0008) + 1.0) / 2.0),
gamma_function(1.5),
Expand All @@ -59,8 +59,8 @@ fn vertex(vertex: Vertex) -> VertexOutput {

let angle = prime % (PI * 2.0);
let position = scale * vertex.position + vec3<f32>(
prime * cos(angle - 0.002 * time) / 50.0,
prime * sin(angle - 0.002 * time) / 50.0,
prime * cos(angle - 0.002 * time) / 500.0,
prime * sin(angle - 0.002 * time) / 500.0,
0.0,
);

Expand Down
2 changes: 1 addition & 1 deletion src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Default for GameCameraBundle {
projection: OrthographicProjection {
far: 1000.,
near: -1000.,
scaling_mode: ScalingMode::FixedVertical(1024.0),
scaling_mode: ScalingMode::FixedVertical(102.40),
..Default::default()
},
tonemapping: Tonemapping::TonyMcMapface,
Expand Down

0 comments on commit 0c2a703

Please sign in to comment.