mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +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() {
|
||||||
f_color = texture(u_texture, v_texcoords);
|
if (u_data.val2[4]) {
|
||||||
|
f_color = texture(u_texture, v_texcoords);
|
||||||
|
} else {
|
||||||
|
f_color = vec4(u_data.val1, 1.0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"#;
|
"#;
|
||||||
|
Loading…
Reference in New Issue
Block a user