Skip to content

Commit 5e71b6c

Browse files
authored
Merge pull request #26 from LykenSol/XsBSRV
Ported "On/Off Spikes" (https://www.shadertoy.com/view/XsBSRV).
2 parents 68749b1 + 6f30e2a commit 5e71b6c

File tree

2 files changed

+453
-1
lines changed

2 files changed

+453
-1
lines changed

shaders/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub mod mandelbrot_smooth;
2222
pub mod miracle_snowflakes;
2323
pub mod morphing;
2424
pub mod moving_square;
25+
pub mod on_off_spikes;
2526
pub mod phantom_star;
2627
pub mod playing_marble;
2728
pub mod protean_clouds;
@@ -61,7 +62,7 @@ impl SampleCube for RgbCube {
6162
}
6263

6364
pub fn fs(constants: &ShaderConstants, mut frag_coord: Vec2) -> Vec4 {
64-
const COLS: usize = 5;
65+
const COLS: usize = 6;
6566
const ROWS: usize = 5;
6667

6768
let resolution = vec3(
@@ -203,6 +204,12 @@ pub fn fs(constants: &ShaderConstants, mut frag_coord: Vec2) -> Vec4 {
203204
24 => {
204205
tokyo::State::new(tokyo::Inputs { resolution, time }).main_image(&mut color, frag_coord)
205206
}
207+
25 => on_off_spikes::State::new(on_off_spikes::Inputs {
208+
resolution,
209+
time,
210+
mouse,
211+
})
212+
.main_image(&mut color, frag_coord),
206213
_ => {}
207214
}
208215
pow(color.truncate(), 2.2).extend(color.w)

0 commit comments

Comments
 (0)