Skip to content

Commit 6650be0

Browse files
committed
revert unintended changes to glslNodeBuilder and MathNode, change bitCount helper function names
1 parent 7b990bf commit 6650be0

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

src/nodes/math/BitcountNode.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class BitcountNode extends MathNode {
6666

6767
}
6868

69-
_constructTrailingZerosBaseLayout( method, elementType ) {
69+
_createTrailingZerosBaseLayout( method, elementType ) {
7070

7171
const fnDef = Fn( ( [ value ] ) => {
7272

@@ -91,7 +91,7 @@ class BitcountNode extends MathNode {
9191

9292
}
9393

94-
_constructTrailingZerosMainLayout( method, inputType, typeLength, baseFn ) {
94+
_createTrailingZerosMainLayout( method, inputType, typeLength, baseFn ) {
9595

9696
const fnDef = Fn( ( [ value ] ) => {
9797

@@ -135,7 +135,7 @@ class BitcountNode extends MathNode {
135135

136136
}
137137

138-
_constructLeadingZerosBaseLayout( method, elementType ) {
138+
_createLeadingZerosBaseLayout( method, elementType ) {
139139

140140
const fnDef = Fn( ( [ value ] ) => {
141141

@@ -197,7 +197,7 @@ class BitcountNode extends MathNode {
197197

198198
}
199199

200-
_constructLeadingZerosMainLayout( method, inputType, typeLength, baseFn ) {
200+
_createLeadingZerosMainLayout( method, inputType, typeLength, baseFn ) {
201201

202202
const fnDef = Fn( ( [ value ] ) => {
203203

@@ -241,7 +241,7 @@ class BitcountNode extends MathNode {
241241

242242
}
243243

244-
_constructOneBitsBaseLayout( method, elementType ) {
244+
_createOneBitsBaseLayout( method, elementType ) {
245245

246246
const fnDef = Fn( ( [ value ] ) => {
247247

@@ -266,7 +266,7 @@ class BitcountNode extends MathNode {
266266

267267
}
268268

269-
_constructOneBitsMainLayout( method, inputType, typeLength, baseFn ) {
269+
_createOneBitsMainLayout( method, inputType, typeLength, baseFn ) {
270270

271271
const fnDef = Fn( ( [ value ] ) => {
272272

@@ -339,21 +339,21 @@ class BitcountNode extends MathNode {
339339

340340
case BitcountNode.COUNT_LEADING_ZEROS: {
341341

342-
baseFn = this._constructLeadingZerosBaseLayout( baseMethod, elementType );
342+
baseFn = this._createLeadingZerosBaseLayout( baseMethod, elementType );
343343
break;
344344

345345
}
346346

347347
case BitcountNode.COUNT_TRAILING_ZEROS: {
348348

349-
baseFn = this._constructTrailingZerosBaseLayout( baseMethod, elementType );
349+
baseFn = this._createTrailingZerosBaseLayout( baseMethod, elementType );
350350
break;
351351

352352
}
353353

354354
case BitcountNode.COUNT_ONE_BITS: {
355355

356-
baseFn = this._constructOneBitsBaseLayout( baseMethod, elementType );
356+
baseFn = this._createOneBitsBaseLayout( baseMethod, elementType );
357357
break;
358358

359359
}
@@ -372,21 +372,21 @@ class BitcountNode extends MathNode {
372372

373373
case BitcountNode.COUNT_LEADING_ZEROS: {
374374

375-
fn = this._constructLeadingZerosMainLayout( newMethod, inputType, typeLength, baseFn );
375+
fn = this._createLeadingZerosMainLayout( newMethod, inputType, typeLength, baseFn );
376376
break;
377377

378378
}
379379

380380
case BitcountNode.COUNT_TRAILING_ZEROS: {
381381

382-
fn = this._constructTrailingZerosMainLayout( newMethod, inputType, typeLength, baseFn );
382+
fn = this._createTrailingZerosMainLayout( newMethod, inputType, typeLength, baseFn );
383383
break;
384384

385385
}
386386

387387
case BitcountNode.COUNT_ONE_BITS: {
388388

389-
fn = this._constructOneBitsMainLayout( newMethod, inputType, typeLength, baseFn );
389+
fn = this._createOneBitsMainLayout( newMethod, inputType, typeLength, baseFn );
390390
break;
391391

392392
}

src/nodes/math/MathNode.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,8 +1099,10 @@ export const atan2 = ( y, x ) => { // @deprecated, r172
10991099

11001100
};
11011101

1102+
// GLSL alias function
11021103

1103-
1104+
export const faceforward = faceForward;
1105+
export const inversesqrt = inverseSqrt;
11041106

11051107
// Method chaining
11061108

src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { DataTexture } from '../../../textures/DataTexture.js';
1010
import { error } from '../../../utils.js';
1111

1212
const glslPolyfills = {
13-
bitcast_int_uint: new CodeNode( /* glsl */'uint tsl_bitcast_uint_to_int ( int x ) { return floatBitsToInt( uintBitsToFloat( x ) ); }' ),
14-
bitcast_uint_int: new CodeNode( /* glsl */'uint tsl_bitcast_int_to_uint ( int x ) { return floatBitsToUint( intBitsToFloat ( x ) ); }' )
13+
bitcast_int_uint: new CodeNode( /* glsl */'uint tsl_bitcast_int_to_uint ( int x ) { return floatBitsToUint( intBitsToFloat ( x ) ); }' ),
14+
bitcast_uint_int: new CodeNode( /* glsl */'uint tsl_bitcast_uint_to_int ( uint x ) { return floatBitsToInt( uintBitsToFloat ( x ) ); }' )
1515
};
1616

1717
const glslMethods = {

0 commit comments

Comments
 (0)