提交 aaaf5454 编写于 作者: S sunag

fix world position

上级 8701e404
......@@ -189,12 +189,10 @@ THREE.NodeMaterial.prototype.build = function() {
if ( this.requestAttribs.worldPosition ) {
// for future update replace from the native "varying vec3 vWorldPosition" for optimization
this.addVertexPars( 'varying vec3 vWPosition;' );
this.addFragmentPars( 'varying vec3 vWPosition;' );
this.addVertexCode( 'vWPosition = worldPosition.xyz;' );
this.addVertexCode( 'vWPosition = ( modelMatrix * vec4( position, 1.0 ) ).xyz;' );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册