Skip to content

Commit

Permalink
WebGPURenderer: Disable fog in shadow-material (mrdoob#30204)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag authored Dec 26, 2024
1 parent c9e5e53 commit 62b2a82
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions src/nodes/lighting/ShadowNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const getShadowMaterial = ( light ) => {
material.depthNode = depthNode;
material.isShadowNodeMaterial = true; // Use to avoid other overrideMaterial override material.colorNode unintentionally when using material.shadowNode
material.name = 'ShadowMaterial';
material.fog = false;

shadowMaterialLib.set( light, material );

Expand Down
6 changes: 0 additions & 6 deletions src/renderers/common/RendererUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ export function saveSceneState( scene, state = {} ) {

state.background = scene.background;
state.backgroundNode = scene.backgroundNode;
state.fog = scene.fog;
state.fogNode = scene.fogNode;
state.overrideMaterial = scene.overrideMaterial;

return state;
Expand All @@ -117,8 +115,6 @@ export function resetSceneState( scene, state ) {

scene.background = null;
scene.backgroundNode = null;
scene.fog = null;
scene.fogNode = null;
scene.overrideMaterial = null;

return state;
Expand All @@ -136,8 +132,6 @@ export function restoreSceneState( scene, state ) {

scene.background = state.background;
scene.backgroundNode = state.backgroundNode;
scene.fog = state.fog;
scene.fogNode = state.fogNode;
scene.overrideMaterial = state.overrideMaterial;

}
Expand Down

0 comments on commit 62b2a82

Please sign in to comment.