ShaderMaterial

RawShaderMaterial

This class works just like ShaderMaterial, except that definitions of built-in uniforms and attributes are not automatically prepended to the GLSL shader code.

Examples

WebGL / buffergeometry / rawshader
WebGL / buffergeometry / instancing / billboards
WebGL / buffergeometry / instancing / dynamic
WebGL / buffergeometry / instancing / interleaved / dynamic
WebGL / buffergeometry / instancing
WebGL / interactive / instances /gpu
WebGL / raymarching / reflect

var material = new v3d.RawShaderMaterial({ uniforms: { time: { value: 1.0 } }, vertexShader: document.getElementById('vertexShader').textContent, fragmentShader: document.getElementById('fragmentShader').textContent, });

Constructor

RawShaderMaterial(parameters : Object)

parameters - (optional) an object with one or more properties defining the material's appearance. Any property of the material (including any property inherited from Material and ShaderMaterial) can be passed in here.

Properties

See the base Material and ShaderMaterial classes for common methods.

.isRawShaderMaterial : Boolean

Used to check whether this or derived classes are raw shader materials. Default is true.

You should not change this, as it used internally for optimisation.

Methods

See the base Material and ShaderMaterial classes for common methods.

Source

For more info on how to obtain the source code of this module see this page.