mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
886 B
886 B
Shader
This page describes components in the legacy luma.gl v8 API. While still supported in luma.gl v9, these components are deprecated and will eventually be removed and should not be used in new applications.
The Shader class are the base class for VertexShader class and FragmentShader class
Usage
Create a pair of shaders
const fs = new VertexShader(gl, source);
const fs = new FragmentShader(gl, source);
Members
handle- holds the underlyingWebGLShaderobject
Constructor
Shader(gl : WebGLRenderingContext, source : String)
source- string containing shader instructions.
Remarks
- Shader sources: A
Programneeds to be constructed with two strings containing source code for vertex and fragment shaders. - Default Shaders: luma.gl comes with a set of default shaders that can be used for basic rendering and picking.