upbge
upbge copied to clipboard
Create material shaders passing file name.
Currently BL_Shader (and derived KX_2DFilter) can setup a shader only by passing the code of each processing units.
The idea of this issue is to allow the user passing file name ending with .glsl
:
sources = {
"vertex" : "vert.glsl",
"fragment" : "frag.glsl"
}
shader.setSourceList(source, True)
any chance to only replace one shader? like only the vertex and keep using the default Fragment... The uniforms (in/out) could be resolved by adding a default "empty" shader (Vs, Gs and Fs) for the user to start with.