|
|
@@ -158,9 +158,22 @@ class ShaderMaterial extends Material {
|
|
|
this.wireframeLinewidth = 1;
|
|
|
|
|
|
/**
|
|
|
- * Define whether the material color is affected by global fog settings; `true`
|
|
|
+ * Defines whether the material color is affected by global fog settings; `true`
|
|
|
* to pass fog uniforms to the shader.
|
|
|
*
|
|
|
+ * Setting this property to `true` requires the definition of fog uniforms. It is
|
|
|
+ * recommended to use `UniformsUtils.merge()` to combine the custom shader uniforms
|
|
|
+ * with predefined fog uniforms.
|
|
|
+ *
|
|
|
+ * ```js
|
|
|
+ * const material = new ShaderMaterial( {
|
|
|
+ * uniforms: UniformsUtils.merge( [ UniformsLib[ 'fog' ], shaderUniforms ] );
|
|
|
+ * vertexShader: vertexShader,
|
|
|
+ * fragmentShader: fragmentShader,
|
|
|
+ * fog: true
|
|
|
+ * } );
|
|
|
+ * ```
|
|
|
+ *
|
|
|
* @type {boolean}
|
|
|
* @default false
|
|
|
*/
|