Skip to content

Commit 79baf12

Browse files
committed
Add missing computation to galaxy_of_universes.
1 parent 6916236 commit 79baf12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shaders/src/galaxy_of_universes.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ pub struct Inputs {
2525
impl Inputs {
2626
pub fn main_image(&self, frag_color: &mut Vec4, frag_coord: Vec2) {
2727
let uv: Vec2 = (frag_coord / self.resolution.xy()) - Vec2::splat(0.5);
28-
let t: f32 = self.time * 0.1 + (0.25 + 0.05 * (self.time * 0.1).sin());
28+
let t: f32 = self.time * 0.1
29+
+ ((0.25 + 0.05 * (self.time * 0.1).sin()) / (uv.length() + 0.07)) * 2.2;
2930
let si: f32 = t.sin();
3031
let co: f32 = t.cos();
3132
let ma: Mat2 = Mat2::from_cols_array(&[co, si, -si, co]);

0 commit comments

Comments
 (0)