Skip to content

Commit ce740a8

Browse files
fixed points texture bug (oppenfuture#38)
Co-authored-by: WenjieLiuu <[email protected]>
1 parent f360199 commit ce740a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/jsm/loaders/GLTFLoader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,7 @@ class GLTFMaterialsPointSpriteExtension {
19901990
if (vIntensity <= 0.0) discard;
19911991
gl_FragColor = vColor;
19921992
vec2 rotateUv = rotateUV(gl_PointCoord, vRandom * vIntensity * PI * 0.6);
1993+
rotateUv = clamp(rotateUv, 0.0, 1.0);
19931994
gl_FragColor = gl_FragColor * texture2D( pointTexture, rotateUv );
19941995
}
19951996
`,

0 commit comments

Comments
 (0)