I know this has been asked before, but for the life of me i cant find the thread.
I have a GUITexture which has an Alpha of 0.5f - set using Unity. When I used a script to fade in the guitexture to the same alpha value, it looks different.
Its a bit hard to see, but trust me, its different - its a lot more obvious with some textures than other (file is PNG24)
That’s an understatement. I literally cannot see a difference between those two. Although one possibility is that, when you fade in, the alpha is not stopping at precisely 0.5. It depends on how your code works…if you’re doing something like “if (alphaValue < 0.5)”, and one frame it’s 0.488 (for example) and the next it’s 0.508, then it would stop at 0.488. In that case, just make sure to set the value specifically at 0.5 as the last step.
lol… yeah sorry if it seems a bit picky - but its really obvious on other types of textures. If you look at the aliasing on the rounded edges of the menubar background u can see its quite jagged.
i checked the opacity floats on my fade functions and after the fade-in completes its loop i manually set it to 0.5f. But still not working~~
The rgb’s were being set to 1.0f - normally that isn’t a problem but it seems to ‘brighten’ the texture in Unity - so as default I have to use r128,g128,b128 - why is that?
The ambient lighting property set via the project rendering settings effect your textures and world.
I’m working on a game where I don’t want any light information to effect my game world. So I deleted all lights and set my rendering ambient light to 100% white. This way the texture information is true to what is rendered.
Ive started using the ‘brighten’ feature for GUI Textures - its actually really useful for simple rollover highlights(rather than having an ‘over’ texture).
nice one guys
While we’re on this topic – rescaling guitextures by setting the pixel offsets seems to mess up the alpha channels – even when the rescale is a power of 2. The larger is 100% the smaller 50% exactly.