Creates a new GLSLShaderRenderer.
The canvas element to render to.
The vertex shader code.
The fragment shader code.
Optional custom uniforms.
The canvas element to render to.
Optional custom uniforms.
Adds assets (textures) to the renderer.
An object containing texture data.
A callback function to be called after the assets are loaded.
Optional
r: anyThe GLSLShaderRenderer instance for chaining.
Adds a buffer (shader program) to the renderer.
The name of the buffer.
The vertex shader code.
The fragment shader code.
Optional
textures: string[]An optional array of texture names.
Optional
customUniforms: anyAn optional object containing custom uniform functions.
The GLSLShaderRenderer instance for chaining.
Creates a shader of the specified type and attaches it to the program.
The WebGLProgram to attach the shader to.
The type of shader (gl.VERTEX_SHADER or gl.FRAGMENT_SHADER).
The shader source code.
Creates a render target.
The width of the render target.
The height of the render target.
An array of texture names to use in the render target.
An object containing custom uniform functions.
The created RenderTarget object.
Static
generate
The
GLSLShaderRenderer
class is responsible for managing WebGL rendering, including shader programs, textures, and render targets. It provides methods for adding and updating buffers, rendering scenes, and managing resources.