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
I've noticed that on two occasions (once in someone's Firefox browser and I don't recall which browser the other person was using), textures would have some kind of color correction applied. This would cause problems for this app I'm working on https://town-collab.app where certain texture colors (such as FF00FF) get replaced with user chosen colors at runtime. The color correction causes the game to look like this
The fix was to add gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, false);. Ideally the webgl package should do this automatically though?
Perhaps also gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); should be used. I haven't encountered any problems with premultiplication but I suspect some browsers are going to randomly have different default values here too.
I've noticed that on two occasions (once in someone's Firefox browser and I don't recall which browser the other person was using), textures would have some kind of color correction applied. This would cause problems for this app I'm working on https://town-collab.app where certain texture colors (such as FF00FF) get replaced with user chosen colors at runtime. The color correction causes the game to look like this
The fix was to add
gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, false);
. Ideally the webgl package should do this automatically though?Perhaps also
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
should be used. I haven't encountered any problems with premultiplication but I suspect some browsers are going to randomly have different default values here too.Edit: For reference, I got the two lines of code from here https://stackoverflow.com/questions/31500597/fragment-shader-wrong-color-value-from-texture
The text was updated successfully, but these errors were encountered: