You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating a shader's uniform using arrays of values (e.g. set4fv instead of set4f, or any of the matrix methods), the uniform will not actually be updated. This causes #5660 (and perhaps other issues?).
All uniform setters, both on WebGLPipelines and WebGLShaders, call the lower-level setUniform2/3/4 methods to update the values. These methods check for identity between the old and the new values, which is a good optimization when using scalar values. For arrays, however, if the same object is passed in, the uniform isn't updated even if the values in the array are the different.
This has been an issue since 3.50. I'd assumed this was intended, but I'm no longer sure considering Phaser gets confused by it, too. In the case of #5660, a setMatrix3fv call gets ignored.
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
When updating a shader's uniform using arrays of values (e.g.
set4fv
instead ofset4f
, or any of the matrix methods), the uniform will not actually be updated. This causes #5660 (and perhaps other issues?).All uniform setters, both on
WebGLPipeline
s andWebGLShader
s, call the lower-levelsetUniform2/3/4
methods to update the values. These methods check for identity between the old and the new values, which is a good optimization when using scalar values. For arrays, however, if the same object is passed in, the uniform isn't updated even if the values in the array are the different.This has been an issue since 3.50. I'd assumed this was intended, but I'm no longer sure considering Phaser gets confused by it, too. In the case of #5660, a
setMatrix3fv
call gets ignored.The text was updated successfully, but these errors were encountered: