Skip to content

Commit

Permalink
refactor(webgl): update deref() uniform handling
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed May 31, 2020
1 parent 13f4184 commit 2c81849
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/webgl/src/shader.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Fn3, IDeref, IObjectOf } from "@thi.ng/api";
import { deref, Fn3, IObjectOf } from "@thi.ng/api";
import {
existsAndNotNull,
implementsFunction,
isArray,
isBoolean,
isFunction,
Expand Down Expand Up @@ -122,11 +121,7 @@ export class Shader implements IShader {
const u = shaderUnis[id];
if (u) {
let val = specUnis[id];
val = isFunction(val)
? val(shaderUnis, specUnis)
: implementsFunction(val, "deref")
? (<IDeref<any>>val).deref()
: val;
val = isFunction(val) ? val(shaderUnis, specUnis) : deref(val);
// console.log(id, val);
u.setter(<UniformValue>val);
} else {
Expand Down

0 comments on commit 2c81849

Please sign in to comment.