@@ -5,6 +5,8 @@ varying vec3 vWorldPosition;
void main() {
vWorldPosition = transformDirection( position, modelMatrix );
- gl_Position = projectionMatrix * vec4( normalMatrix * position, 1.0 );
+
+ #include <begin_vertex>
+ #include <project_vertex>
}
@@ -64,6 +64,7 @@ function WebGLBackground( renderer, state, geometries, premultipliedAlpha ) {
boxMesh.material.uniforms.tCube.value = background;
+ boxMesh.matrixWorld.copyPosition( camera.matrixWorld );
renderList.push( boxMesh, boxMesh.geometry, boxMesh.material, 0, null );