ShaderMaterial constructor
ShaderMaterial(
[ - Map<String, dynamic>? parameters
])
Implementation
ShaderMaterial([Map<String, dynamic>? parameters]) : super() {
type = 'ShaderMaterial';
defines = {};
uniforms = {};
vertexShader = defaultVertex;
fragmentShader = defaultFragment;
linewidth = 1;
wireframe = false;
wireframeLinewidth = 1;
fog = false; // set to use scene fog
lights = false; // set to use scene lights
clipping = false; // set to use user-defined clipping planes
extensions = {
"derivatives": false, // set to use derivatives
"fragDepth": false, // set to use fragment depth values
"drawBuffers": false, // set to use draw buffers
"shaderTextureLOD": false // set to use shader texture LOD
};
// When rendered geometry doesn't include these attributes but the material does,
// use these default values in WebGL. This avoids errors when buffer data is missing.
defaultAttributeValues = {
'color': [1, 1, 1],
'uv': [0, 0],
'uv2': [0, 0]
};
index0AttributeName = null;
uniformsNeedUpdate = false;
glslVersion = null;
if (parameters != null) {
if (parameters["attributes"] != null) {
print('three.ShaderMaterial: attributes should now be defined in three.BufferGeometry instead.');
}
setValues(parameters);
}
}