Skip to content

Commit 284c5fe

Browse files
Mugen87sunag
andauthored
RendererUtils: Honor fog. (mrdoob#30178)
Co-authored-by: sunag <[email protected]>
1 parent 0bdd6d1 commit 284c5fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/renderers/common/RendererUtils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export function saveSceneState( scene, state = {} ) {
5656

5757
state.background = scene.background;
5858
state.backgroundNode = scene.backgroundNode;
59+
state.fog = scene.fog;
60+
state.fogNode = scene.fogNode;
5961
state.overrideMaterial = scene.overrideMaterial;
6062

6163
return state;
@@ -68,6 +70,8 @@ export function resetSceneState( scene, state ) {
6870

6971
scene.background = null;
7072
scene.backgroundNode = null;
73+
scene.fog = null;
74+
scene.fogNode = null;
7175
scene.overrideMaterial = null;
7276

7377
return state;
@@ -78,6 +82,8 @@ export function restoreSceneState( scene, state ) {
7882

7983
scene.background = state.background;
8084
scene.backgroundNode = state.backgroundNode;
85+
scene.fog = state.fog;
86+
scene.fogNode = state.fogNode;
8187
scene.overrideMaterial = state.overrideMaterial;
8288

8389
}

0 commit comments

Comments
 (0)