AbstractThe renderer creates shaders; a game does not call it.
ProtectedassetsThe project assets.
StaticshaderThe name the configuration uses for the shader. DefineShader sets it, so a game usually does not assign it.
AbstractfragmentRuns when the renderer creates the shader. Returns the fragment shader code.
OptionalshaderRuns every frame. When the returned string changes, the renderer creates the shader again. Optional.
OptionaltexturesRuns when the renderer creates the shader and every frame. Write your
textures into textures, by the name of their sampler2D uniform. The
keys written on the first call declare the textures of the shader, so
write every key on every call. Optional.
OptionaluniformsRuns when the renderer creates the shader. Returns your own uniforms, with a start value and a type. Optional.
OptionalupdateRuns every frame. Write the new uniform values into uniforms. Optional.
AbstractvertexRuns when the renderer creates the shader. Returns the vertex shader code.
Base class for the shaders of the Mesh component.
Extend it and name the class with DefineShader. Every method gets the material options of the mesh as
options. A texture referenced by anassetfield of the shader is loaded before the scene starts.See
Shaders