Renaud Rohlinger 1 год назад
Родитель
Сommit
5fec042ae3

+ 1 - 1
examples/jsm/geometries/InstancedPointsGeometry.js

@@ -20,7 +20,7 @@ class InstancedPointsGeometry extends InstancedBufferGeometry {
 		this.type = 'InstancedPointsGeometry';
 
 		const positions = [ - 1, 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ];
-		const uvs = [ - 1, 1, 1, 1, - 1, - 1, 1, - 1 ];
+		const uvs = [ 0, 1, 1, 1, 0, 0, 1, 0 ];
 		const index = [ 0, 2, 1, 2, 3, 1 ];
 
 		this.setIndex( index );

+ 1 - 1
src/materials/nodes/InstancedPointsNodeMaterial.js

@@ -92,7 +92,7 @@ class InstancedPointsNodeMaterial extends NodeMaterial {
 
 			const alpha = float( 1 ).toVar();
 
-			const len2 = lengthSq( uv() );
+			const len2 = lengthSq( uv().mul( 2 ).sub( 1 ) );
 
 			if ( useAlphaToCoverage ) {
 

粤ICP备19079148号