Please check the PG#1.
I assign a new PBRCustomMaterial
for the green sphere with a custom float uniform myWhiteness
. But when I try to set it inside a setTimeout
, I get the WebGL: INVALID_OPERATION: uniform1f: location not for current program
warning, and the float value is not set.
If I remove the second sphere from the scene (comment out sphere2
), the warning is gone and the float uniform is set as expected.
Is this a bug or should I use AddUniform
method instead of getEffect().setFloat
every time I want to change a uniform’s value (like in PG#2)? This kind of fixes the issue, but seems counter intuitive to me
I’m using Chrome 75.0.3770.142 on Mac.