Skip to content

Commit

Permalink
RendererUtils: Honor fog. (#30178)
Browse files Browse the repository at this point in the history
Co-authored-by: sunag <[email protected]>
  • Loading branch information
Mugen87 and sunag authored Dec 21, 2024
1 parent 0bdd6d1 commit 284c5fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/renderers/common/RendererUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ 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 @@ -68,6 +70,8 @@ export function resetSceneState( scene, state ) {

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

return state;
Expand All @@ -78,6 +82,8 @@ 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 284c5fe

Please sign in to comment.