소스 검색

rename texure uniform

aardgoose 6 년 전
부모
커밋
b01436103b
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      examples/webgl_interactive_points.html

+ 3 - 3
examples/webgl_interactive_points.html

@@ -35,7 +35,7 @@
 		<script type="x-shader/x-fragment" id="fragmentshader">
 
 			uniform vec3 color;
-			uniform sampler2D texture;
+			uniform sampler2D pointTexture;
 
 			varying vec3 vColor;
 
@@ -43,7 +43,7 @@
 
 				gl_FragColor = vec4( color * vColor, 1.0 );
 
-				gl_FragColor = gl_FragColor * texture2D( texture, gl_PointCoord );
+				gl_FragColor = gl_FragColor * texture2D( pointTexture, gl_PointCoord );
 
 				if ( gl_FragColor.a < ALPHATEST ) discard;
 
@@ -124,7 +124,7 @@
 
 					uniforms: {
 						color: { value: new Color( 0xffffff ) },
-						texture: { value: new TextureLoader().load( "textures/sprites/disc.png" ) }
+						pointTexture: { value: new TextureLoader().load( "textures/sprites/disc.png" ) }
 					},
 					vertexShader: document.getElementById( 'vertexshader' ).textContent,
 					fragmentShader: document.getElementById( 'fragmentshader' ).textContent,