Skip to content

Commit 926060e

Browse files
authored
Docs: Improve ShaderMaterial.fog. (#32224)
1 parent 44bd3ad commit 926060e

File tree

6 files changed

+15
-1
lines changed

6 files changed

+15
-1
lines changed
-11.9 KB
Loading
-271 Bytes
Loading
185 Bytes
Loading
437 Bytes
Loading

src/materials/ShaderMaterial.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,22 @@ class ShaderMaterial extends Material {
158158
this.wireframeLinewidth = 1;
159159

160160
/**
161-
* Define whether the material color is affected by global fog settings; `true`
161+
* Defines whether the material color is affected by global fog settings; `true`
162162
* to pass fog uniforms to the shader.
163163
*
164+
* Setting this property to `true` requires the definition of fog uniforms. It is
165+
* recommended to use `UniformsUtils.merge()` to combine the custom shader uniforms
166+
* with predefined fog uniforms.
167+
*
168+
* ```js
169+
* const material = new ShaderMaterial( {
170+
* uniforms: UniformsUtils.merge( [ UniformsLib[ 'fog' ], shaderUniforms ] );
171+
* vertexShader: vertexShader,
172+
* fragmentShader: fragmentShader,
173+
* fog: true
174+
* } );
175+
* ```
176+
*
164177
* @type {boolean}
165178
* @default false
166179
*/

test/e2e/puppeteer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const exceptionList = [
2323
'physics_rapier_instancing',
2424
'webgl_shadowmap',
2525
'webgl_postprocessing_dof2',
26+
'webgl_postprocessing_glitch',
2627
'webgl_video_kinect',
2728
'webgl_worker_offscreencanvas',
2829
'webgpu_backdrop_water',

0 commit comments

Comments
 (0)