upbge icon indicating copy to clipboard operation
upbge copied to clipboard

Create material shaders passing file name.

Open panzergame opened this issue 6 years ago • 1 comments

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)

panzergame avatar Aug 30 '18 17:08 panzergame

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.

UnidayStudio avatar Aug 31 '18 13:08 UnidayStudio