My apologies! I was on the road for a bit-- here is a playground for it: it’s on line 14.
My objective is simply to tint a GUI Image: most major engines allow one to adjust the .color property on a sprite in order to apply a tint (similar to lighting for a material): for example:
image.color = new BABYLON.Color4(0,0,0,0);
Would this be the correct usage?
After all, if you can do image.alpha = 0 then it would seem consistent that you can do image.color = new BABYLON.Color4(0,0,0,0);
I would like to create a set of multicolored images from a single grayscale object, rather than creating assets in various colors.
I appreciate Deltakosh’s suggestion to use alpha, but here I would need a color tint, rather than alpha.
I appreciate Rah’s CustomFragmentShader, but I think that might be overkill.
I appreciate Gijs’ suggestion of modifying the image pixels via canvas, but I think that might be too slow to change colors frequently
This is the first time I’m posting a playground snippet, so I hope this link works!