Constructor
new L3D.ShaderBlock()
Methods
addCode(shaderType, enabledCode, disabledCode, macros)
Register a shaderblock with the given id
shaderType |
number | could be ShaderBlock.VertexShader or ShaderBlock.FragmentShader |
enabledCode |
String | the code to insert if the shaderblock is enabled |
disabledCode |
String | the code to insert if the shaderblock is disabled |
macros |
Object | a set of macros to use when compiling this shader codes |
getFinalCode(shaderType, blockFlags, context) → String
Returns the full code of a ShaderBlock resolving all includes, ShaderBlocks, etc.
shaderType |
number | Can be ShaderBlock.VertexShader or ShaderBlock.FragmentShader |
blockFlags |
number | A number containing the mask (every bit is a flag for a |
context |
* | An object with variable that could be fetched by the ShaderBlocks |
- String