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

WebGLBackground: Replaced polygonOffset with gl_Position.z overwrite. See #12172.

上级 9551c93b
......@@ -9,4 +9,6 @@ void main() {
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}
......@@ -54,7 +54,6 @@ function WebGLBackground( renderer, state, geometries, premultipliedAlpha ) {
side: BackSide,
depthTest: true,
depthWrite: false,
polygonOffset: true,
fog: false
} )
);
......@@ -64,13 +63,8 @@ function WebGLBackground( renderer, state, geometries, premultipliedAlpha ) {
boxMesh.onBeforeRender = function ( renderer, scene, camera ) {
var scale = camera.far;
this.matrixWorld.makeScale( scale, scale, scale );
this.matrixWorld.copyPosition( camera.matrixWorld );
this.material.polygonOffsetUnits = scale * 10;
};
geometries.update( boxMesh.geometry );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册