I’m trying to do smooth screen transitions using fade in/out… Is it possible to animate the opacity of a collection/game object/sprite? I know I can set a sprite’s opacity by doing:
What does the w in “tint.w” mean and what other tint properties are there? (i am interested in the alpha channel and tint.w seems to be fading the colour to white)
“tint” is a shader constant which is defined for the builtin material you use to draw sprites. You can change that of course. .w is the fourth component of that value, as in .x, .y, .z, .w. This means that .w does whatever the shader implements it to do, in this case be multiplied onto the fourth color component, which happens to define transparency for blending.
In other words “tint” is not a part of the engine, it’s a part of the builtin content we ship with it. All of this also means that you can change the values to whatever you need if you choose to have a different lighting model.