Interface IShaderMaterialOptions
interface IShaderMaterialOptions {
attributes: string[];
defines: string[];
externalTextures: string[];
extraInitializationsAsync?: () => Promise<void>;
needAlphaBlending: boolean;
needAlphaTesting: boolean;
samplerObjects: string[];
samplers: string[];
shaderLanguage?: ShaderLanguage;
storageBuffers: string[];
uniformBuffers: string[];
uniforms: string[];
useClipPlane: Nullable<boolean>;
}
attributes: string[];
defines: string[];
externalTextures: string[];
extraInitializationsAsync?: () => Promise<void>;
needAlphaBlending: boolean;
needAlphaTesting: boolean;
samplerObjects: string[];
samplers: string[];
shaderLanguage?: ShaderLanguage;
storageBuffers: string[];
uniformBuffers: string[];
uniforms: string[];
useClipPlane: Nullable<boolean>;
}
Properties
attributes
attributes: string[]
The list of attribute names used in the shader
defines
defines: string[]
The list of defines used in the shader
external Textures
externalTextures: string[]
The list of external texture names used in the shader
Optionalextra Initializations Async
extraInitializationsAsync?: () => Promise<void>
Defines additional code to call to prepare the shader code
need Alpha Blending
needAlphaBlending: boolean
Does the material work in alpha blend mode
need Alpha Testing
needAlphaTesting: boolean
Does the material work in alpha test mode
sampler Objects
samplerObjects: string[]
The list of sampler object names used in the shader
samplers
samplers: string[]
The list of sampler (texture) names used in the shader
Optionalshader Language
The language the shader is written in (default: GLSL)
storage Buffers
storageBuffers: string[]
The list of storage buffer names used in the shader
uniform Buffers
uniformBuffers: string[]
The list of UBO names used in the shader
uniforms
uniforms: string[]
The list of uniform names used in the shader
use Clip Plane
Defines if clip planes have to be turned on: true to turn them on, false to turn them off and null to turn them on/off depending on the scene configuration (scene.clipPlaneX)
Defines the options associated with the creation of a shader material.