2020-05-30 19:31:04 +00:00
|
|
|
#version 450
|
|
|
|
|
|
|
|
layout(location = 0) in vec2 v_Uv;
|
|
|
|
|
|
|
|
layout(location = 0) out vec4 o_Target;
|
|
|
|
|
2020-06-22 19:14:40 +00:00
|
|
|
layout(set = 1, binding = 0) uniform ColorMaterial_color {
|
2020-05-30 19:31:04 +00:00
|
|
|
vec4 Color;
|
|
|
|
};
|
|
|
|
|
|
|
|
# ifdef COLORMATERIAL_TEXTURE
|
2020-06-22 19:14:40 +00:00
|
|
|
layout(set = 1, binding = 1) uniform texture2D ColorMaterial_texture;
|
|
|
|
layout(set = 1, binding = 2) uniform sampler ColorMaterial_texture_sampler;
|
2020-05-30 19:31:04 +00:00
|
|
|
# endif
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
vec4 color = Color;
|
|
|
|
# ifdef COLORMATERIAL_TEXTURE
|
|
|
|
color *= texture(
|
|
|
|
sampler2D(ColorMaterial_texture, ColorMaterial_texture_sampler),
|
|
|
|
v_Uv);
|
|
|
|
# endif
|
|
|
|
o_Target = color;
|
|
|
|
}
|