- /* XXX bad, should change Collection API to allow creators to form paths
- relative to the datafile location */
- path = p;
+ if(name!="ui.glsl")
+ return nullptr;
+
+ unique_ptr<GL::Module> mod;
+ if(GL::get_backend_api()==GL::VULKAN)
+ mod = make_unique<GL::SpirVModule>();
+ else
+ mod = make_unique<GL::GlslModule>();
+
+ mod->set_source("import msp_interface; import common;\n"
+ "uniform sampler2D ui_tex;\n"
+ "#pragma MSP stage(fragment)\n"
+ "void main() { frag_color = texture(ui_tex, texcoord.xy)*color; }\n");
+
+ return mod.release();