Skip to content

Commit 675072a

Browse files
committed
Support int/uint sampler in uniform setter
1 parent 0b1d96d commit 675072a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/renderers/webgl/WebGLUniforms.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,19 @@ function getSingularSetter( type ) {
475475
case 0x8b5b: return setValue3fm; // _MAT3
476476
case 0x8b5c: return setValue4fm; // _MAT4
477477

478-
case 0x8b5e: case 0x8d66: return setValueT1; // SAMPLER_2D, SAMPLER_EXTERNAL_OES
479-
case 0x8B5F: return setValueT3D1; // SAMPLER_3D
480-
case 0x8b60: return setValueT6; // SAMPLER_CUBE
478+
case 0x8b5e: // SAMPLER_2D
479+
case 0x8d66: // SAMPLER_EXTERNAL_OES
480+
case 0x8dca: // INT_SAMPLER_2D
481+
case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D
482+
return setValueT1;
483+
case 0x8b5f: // SAMPLER_3D
484+
case 0x8dcb: // INT_SAMPLER_3D
485+
case 0x8dd3: // UNSIGNED_INT_SAMPLER_3D
486+
return setValueT3D1;
487+
case 0x8b60: // SAMPLER_CUBE
488+
case 0x8dcc: // INT_SAMPLER_CUBE
489+
case 0x8dd4: // UNSIGNED_SAMPLER_CUBE
490+
return setValueT6;
481491

482492
case 0x1404: case 0x8b56: return setValue1i; // INT, BOOL
483493
case 0x8b53: case 0x8b57: return setValue2iv; // _VEC2

0 commit comments

Comments
 (0)