浏览代码

fix use with operator and share to optimize

SUNAG 9 年之前
父节点
当前提交
cd80a94cdb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/js/nodes/accessors/ScreenUVNode.js

+ 2 - 2
examples/js/nodes/accessors/ScreenUVNode.js

@@ -4,7 +4,7 @@
 
 THREE.ScreenUVNode = function( resolution ) {
 
-	THREE.TempNode.call( this, 'v2', { shared: false } );
+	THREE.TempNode.call( this, 'v2' );
 
 	this.resolution = resolution;
 
@@ -20,7 +20,7 @@ THREE.ScreenUVNode.prototype.generate = function( builder, output ) {
 
 	if ( builder.isShader( 'fragment' ) ) {
 
-		result = 'gl_FragCoord.xy/' + this.resolution.build( builder, 'v2' );
+		result = '(gl_FragCoord.xy/' + this.resolution.build( builder, 'v2' ) + ')';
 
 	}
 	else {