After I add a ColorTransform object to a BitmapMaterial, it completely overwrites the material to basically change it to a ColorMaterial. All I want to do is tint the (greyscale) texture to a certain color. Here’s my code:
var ctm:ColorTransform = new ColorTransform();
ctm.color = (randomShade << 16) | (randomShade << 8) | randomShade;
bmMat.colorTransform = ctm;
Fairly straight-forward. But am I missing something?
Update: I was missing the color multipliers, which needed to be set between 0.4 and 0.7 to be noticeable. They also need to be set after color is. Sorry, haven’t worked with ColorTransform very much… obviously.