Просмотр исходного кода

WebGPURenderer: Fix background rotation with nodes. (#33892)

Michael Herzog 3 недель назад
Родитель
Сommit
1444b75902
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/nodes/accessors/SceneProperties.js

+ 1 - 1
src/nodes/accessors/SceneProperties.js

@@ -31,7 +31,7 @@ export const backgroundRotation = /*@__PURE__*/ uniform( new Matrix4() ).setGrou
 
 	const background = scene.background;
 
-	if ( background !== null && background.isTexture && background.mapping !== UVMapping ) {
+	if ( ( background !== null && background.isTexture && background.mapping !== UVMapping ) || ( scene.backgroundNode && scene.backgroundNode.isNode ) ) {
 
 		// note: since the matrix is orthonormal, we can use the more-efficient transpose() in lieu of invert()
 		_m1.makeRotationFromEuler( scene.backgroundRotation ).transpose();

粤ICP备19079148号