File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,29 @@ void main(void) {
22
22
23
23
//http://stackoverflow.com/questions/3497068/textured-points-in-opengl-es-2-0
24
24
//gl_FragColor = texture2D(uSampler, vec2(gl_PointCoord.x, 1.0 - gl_PointCoord.y));
25
+
26
+ //https://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/discard.php
25
27
const fs =
26
28
`
27
29
precision mediump float;
28
30
uniform sampler2D uSampler;
29
31
30
32
void main()
31
33
{
32
- gl_FragColor = texture2D(uSampler, vec2(gl_PointCoord.x, gl_PointCoord.y));
34
+ vec4 color = texture2D(uSampler, vec2(gl_PointCoord.x, gl_PointCoord.y));
35
+ if(color.a == 0.0){
36
+ discard;
37
+ }
38
+ gl_FragColor = color;
33
39
}
34
40
` ;
35
41
36
42
class Poi extends Graphic {
37
43
private constructor (
38
- public geometry : Marker ,
39
- public material : PoiMaterial ,
40
- public uuid : string ,
41
- public name : string ,
44
+ public geometry : Marker ,
45
+ public material : PoiMaterial ,
46
+ public uuid : string ,
47
+ public name : string ,
42
48
public address : string ,
43
49
public phone : string ) {
44
50
super ( geometry , material ) ;
You can’t perform that action at this time.
0 commit comments