mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-26 00:34:19 +00:00
Slightly change example
This commit is contained in:
parent
561b941e2c
commit
be43ab8218
@ -5,13 +5,23 @@ fn main() {
|
|||||||
let shader = r#"
|
let shader = r#"
|
||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
|
struct S {
|
||||||
|
vec3 val1;
|
||||||
|
bool val2[5];
|
||||||
|
};
|
||||||
|
|
||||||
uniform sampler2D u_texture;
|
uniform sampler2D u_texture;
|
||||||
|
uniform S u_data;
|
||||||
|
|
||||||
in vec2 v_texcoords;
|
in vec2 v_texcoords;
|
||||||
out vec4 f_color;
|
out vec4 f_color;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
if (u_data.val2[4]) {
|
||||||
f_color = texture(u_texture, v_texcoords);
|
f_color = texture(u_texture, v_texcoords);
|
||||||
|
} else {
|
||||||
|
f_color = vec4(u_data.val1, 1.0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"#;
|
"#;
|
||||||
|
Loading…
Reference in New Issue
Block a user