LitShaderOptions
The lit shader options determines how the lit-shader gets generated. It specifies a set of parameters which triggers different fragment and vertex shader generation in the backend.
Summary
Properties
alphaTest | Enable alpha testing. |
alphaToCoverage | Enable alpha to coverage. |
ambientSH | If ambient spherical harmonics are used. |
ambientSource | One of "ambientSH", "envAtlas", "constant". |
blendType | The value of Material#blendType. |
chunks | Object containing custom shader chunks that will replace default ones. |
conserveEnergy | The value of StandardMaterial#conserveEnergy. |
cubeMapProjection | The value of StandardMaterial#cubeMapProjection. |
customFragmentShader | Replaced the whole fragment shader with this string. |
fastTbn | Use slightly cheaper normal mapping code (skip tangent space normalization). |
fixSeams | If cubemaps require seam fixing (see the |
fog | The type of fog being applied in the shader. |
fresnelModel | The value of StandardMaterial#fresnelModel. |
gamma | The type of gamma correction being applied in the shader. |
occludeDirect | The value of StandardMaterial#occludeDirect. |
occludeSpecular | The value of StandardMaterial#occludeSpecular. |
occludeSpecularFloat | Defines if StandardMaterial#occludeSpecularIntensity constant should affect specular occlusion. |
opacityFadesSpecular | Enable specular fade. |
reflectionSource | One of "envAtlasHQ", "envAtlas", "cubeMap", "sphereMap". |
shadingModel | The value of StandardMaterial#shadingModel. |
skyboxIntensity | Skybox intensity factor. |
toneMap | The type of tone mapping being applied in the shader. |
twoSidedLighting | The value of StandardMaterial#twoSidedLighting. |
useCubeMapRotation | If cube map rotation is enabled. |
useInstancing | If hardware instancing compatible shader should be generated. |
useMetalness | The value of StandardMaterial#useMetalness. |
useMorphNormal | If morphing code should be generated to morph normals. |
useMorphPosition | If morphing code should be generated to morph positions. |
userAttributes | Object containing a map of user defined vertex attributes to attached shader semantics. |
useRefraction | If refraction is used. |
useSpecular | If any specular or reflections are needed at all. |
Details
Constructor
LitShaderOptions()
Properties
If ambient spherical harmonics are used. Ambient SH replace prefiltered cubemap ambient on certain platforms (mostly Android) for performance reasons.
Use slightly cheaper normal mapping code (skip tangent space normalization). Can look buggy sometimes.
If cubemaps require seam fixing (see the fixCubemapSeams
property of the options object
passed to the Texture constructor).
The type of fog being applied in the shader. See Scene#fog for the list of possible values.
The type of gamma correction being applied in the shader. See Scene#gammaCorrection for the list of possible values.
Defines if StandardMaterial#occludeSpecularIntensity constant should affect specular occlusion.
The type of tone mapping being applied in the shader. See Scene#toneMapping for the list of possible values.
If hardware instancing compatible shader should be generated. Transform is read from per-instance VertexBuffer instead of shader's uniforms.
Object containing a map of user defined vertex attributes to attached shader semantics.