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

Example: Fixed webgl_interactive_points alphaTest code

上级 a752e510
......@@ -36,6 +36,7 @@
uniform vec3 color;
uniform sampler2D pointTexture;
uniform float alphaTest;
varying vec3 vColor;
......@@ -45,7 +46,7 @@
gl_FragColor = gl_FragColor * texture2D( pointTexture, gl_PointCoord );
if ( gl_FragColor.a < ALPHATEST ) discard;
if ( gl_FragColor.a < alphaTest ) discard;
}
......@@ -120,12 +121,11 @@
uniforms: {
color: { value: new THREE.Color( 0xffffff ) },
pointTexture: { value: new THREE.TextureLoader().load( 'textures/sprites/disc.png' ) }
pointTexture: { value: new THREE.TextureLoader().load( 'textures/sprites/disc.png' ) },
alphaTest: { value: 0.9 }
},
vertexShader: document.getElementById( 'vertexshader' ).textContent,
fragmentShader: document.getElementById( 'fragmentshader' ).textContent,
alphaTest: 0.9
fragmentShader: document.getElementById( 'fragmentshader' ).textContent
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册