提交 e1861b90 编写于 作者: M Mr.doob

WebGLBackground: Simpler skybox code. Thanks @WestLangley!

上级 169382e1
......@@ -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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册