Skip to content

Commit

Permalink
InstancedPoints: Fix UVs (mrdoob#29396)
Browse files Browse the repository at this point in the history
  • Loading branch information
RenaudRohlinger authored and LD2Studio committed Sep 13, 2024
1 parent 8054742 commit f36f446
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/jsm/geometries/InstancedPointsGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/materials/nodes/InstancedPointsNodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down

0 comments on commit f36f446

Please sign in to comment.