import msp_interface; import common; struct UnlitMaterialParameters { vec4 color; }; layout(set=1) uniform UnlitMaterial { UnlitMaterialParameters unlit_material; float alpha_cutoff; }; layout(set=1) uniform sampler2D color_tex; layout(constant_id=auto) const bool use_texture = false; layout(constant_id=auto) const bool use_vertex_color = false; layout(constant_id=auto) const bool use_fog = false; layout(constant_id=auto) const bool use_alpha_cutoff = false; #pragma MSP stage(fragment) virtual vec4 get_color() { vec4 result = unlit_material.color; if(use_texture) result *= texture(color_tex, texcoord.xy); if(use_vertex_color) result *= color; return result; } void main() { vec4 color = get_color(); if(use_alpha_cutoff && color.a