mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
Slightly change example
This commit is contained in:
parent
561b941e2c
commit
be43ab8218
@ -5,13 +5,23 @@ fn main() {
|
||||
let shader = r#"
|
||||
#version 450
|
||||
|
||||
struct S {
|
||||
vec3 val1;
|
||||
bool val2[5];
|
||||
};
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
uniform S u_data;
|
||||
|
||||
in vec2 v_texcoords;
|
||||
out vec4 f_color;
|
||||
|
||||
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