Skip to content

Commit 1d421fd

Browse files
authored
Merge pull request #19 from LykenSol/XtsSWs
Ported "Skyline" (https://www.shadertoy.com/view/XtsSWs).
2 parents 815ef71 + cc50f56 commit 1d421fd

File tree

3 files changed

+1181
-2
lines changed

3 files changed

+1181
-2
lines changed

shaders/src/lib.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub mod playing_marble;
2424
pub mod protean_clouds;
2525
pub mod raymarching_primitives;
2626
pub mod seascape;
27+
pub mod skyline;
2728
pub mod soft_shadow_variation;
2829
pub mod tileable_water_caustic;
2930
pub mod two_tweets;
@@ -56,7 +57,7 @@ impl Channel for RgbCube {
5657
}
5758

5859
pub fn fs(constants: &ShaderConstants, mut frag_coord: Vec2) -> Vec4 {
59-
const COLS: usize = 4;
60+
const COLS: usize = 5;
6061
const ROWS: usize = 5;
6162

6263
let resolution = vec3(
@@ -171,6 +172,16 @@ pub fn fs(constants: &ShaderConstants, mut frag_coord: Vec2) -> Vec4 {
171172
}
172173
.main_image(&mut color, frag_coord),
173174
19 => moving_square::Inputs { resolution, time }.main_image(&mut color, frag_coord),
175+
20 => skyline::State::new(skyline::Inputs {
176+
resolution,
177+
time,
178+
mouse,
179+
channel0: RgbCube {
180+
alpha: 1.0,
181+
intensity: 1.0,
182+
},
183+
})
184+
.main_image(&mut color, frag_coord),
174185
_ => {}
175186
}
176187
pow(color.truncate(), 2.2).extend(color.w)

0 commit comments

Comments
 (0)