Class for custom shaders.
To create one, create a shaders
folder in your assets/mod folder, then add a file named my-shader.frag
or/and my-shader.vert
.
Non-existent shaders will only load the default one, and throw a warning in the console.
To access the shader's uniform variables, use shader.variable
Constructor
View in GitHub
new(name:String, glslVersion:String = "120")
Creates a new custom shader
Parameters:
name | Name of the frag and vert files. |
---|---|
glslVersion | GLSL version to use. Defaults to |