Constructor
new SimpleShader(vertexShaderPath, fragmentShaderPath) → {SimpleShader}
Parameters:
| Name | Type | Description |
|---|---|---|
vertexShaderPath |
string | path to the vertex shader file |
fragmentShaderPath |
string | path to the fragment shader file |
- Source:
Returns:
a new SimpleShader instance
- Type
- SimpleShader
Methods
activate(pixelColor, trsMatrix, cameraMatrix)
Activate this shader for rendering
Parameters:
| Name | Type | Description |
|---|---|---|
pixelColor |
vec4 | [R,G,B,A] color array for the pixels |
trsMatrix |
mat4 | translation, rotation, and scaling matrix for the object being rendered |
cameraMatrix |
mat4 | translation, rotation, and scaling matrix for the Camera |
- Source:
cleanUp()
Detaches and removes the shader from webGL
- Source: