Ver Fonte

Updated builds.

Mr.doob há 4 meses atrás
pai
commit
950410634a

+ 3 - 7
build/three.webgpu.js

@@ -47813,7 +47813,9 @@ class Background extends DataMap {
 
 				// compute vertex position
 				const modifiedPosition = isOrtho.select( positionLocal.mul( orthoScale ), positionLocal );
-				let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 1.0 ) ) );
+
+				// By using a w component of 0, the skybox will not translate when the camera moves through the scene
+				let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) ) );
 
 				// force background to far plane so it does not occlude objects
 				viewProj = viewProj.setZ( viewProj.w );
@@ -47834,12 +47836,6 @@ class Background extends DataMap {
 				backgroundMesh.frustumCulled = false;
 				backgroundMesh.name = 'Background.mesh';
 
-				backgroundMesh.onBeforeRender = function ( renderer, scene, camera ) {
-
-					this.matrixWorld.copyPosition( camera.matrixWorld );
-
-				};
-
 				function onBackgroundDispose() {
 
 					background.removeEventListener( 'dispose', onBackgroundDispose );

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
build/three.webgpu.min.js


+ 3 - 7
build/three.webgpu.nodes.js

@@ -47813,7 +47813,9 @@ class Background extends DataMap {
 
 				// compute vertex position
 				const modifiedPosition = isOrtho.select( positionLocal.mul( orthoScale ), positionLocal );
-				let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 1.0 ) ) );
+
+				// By using a w component of 0, the skybox will not translate when the camera moves through the scene
+				let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) ) );
 
 				// force background to far plane so it does not occlude objects
 				viewProj = viewProj.setZ( viewProj.w );
@@ -47834,12 +47836,6 @@ class Background extends DataMap {
 				backgroundMesh.frustumCulled = false;
 				backgroundMesh.name = 'Background.mesh';
 
-				backgroundMesh.onBeforeRender = function ( renderer, scene, camera ) {
-
-					this.matrixWorld.copyPosition( camera.matrixWorld );
-
-				};
-
 				function onBackgroundDispose() {
 
 					background.removeEventListener( 'dispose', onBackgroundDispose );

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
build/three.webgpu.nodes.min.js


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff

粤ICP备19079148号