The Shader
class are the base class for VertexShader
class and FragmentShader
class
Create a pair of shaders
const fs = new VertexShader(gl, source);
const fs = new FragmentShader(gl, source);
handle
- holds the underlying WebGLShader
objectsource
- string containing shader instructions.Program
needs to be constructed with two strings containing source code for vertex and fragment shaders.