Skip to content

Commit a727fff

Browse files
committed
feat: add support for boolean uniforms
1 parent 4bbe521 commit a727fff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/src/internal/useUniforms.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function useUniforms<U extends Uniforms>(uniforms: U) {
5656
if (uniformLocation === -1) return -1;
5757

5858
if (typeof value === "number") return _gl.uniform1f(uniformLocation, value);
59+
if (typeof value === "boolean") return _gl.uniform1i(uniformLocation, value ? 1 : 0);
5960

6061
if (value instanceof WebGLTexture) {
6162
if (!textureUnits.has(name)) {

0 commit comments

Comments
 (0)