-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
Milestone
Description
Currently we rely on a single glsl file with preprocessors separating each shader type.
#version 330
#if defined VERTEX_SHADER
// Vertex Shader
in vec3 in_position;
void main() {
gl_Position = vec4(in_position, 1.0);
}
#elif defined FRAGMENT_SHADER
// Fragment Shader
out vec4 fragColor;
void main() {
fragColor = vec4(1.0);
}
#endif
There are very good reasons to support mixing and matching different shaders and this would be fairly easy to achieve.
# Single file
shaders.load('test.glsl')
# Multiple files
shaders.load(vertex_shader='test.vert', fragment_shader='test.frag', .... etc)