Slightly change example

This commit is contained in:
Pierre Krieger 2016-01-31 14:29:53 +01:00
parent 561b941e2c
commit be43ab8218

View File

@ -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);
}
}
"#;