Just wondered if any of you might have any thoughts on this.
I'm just mucking about with texturing quads in the hopes that I might be able to make some passable vegetation. I've got a GLSL shader I'm using to texture the quad (that I will animate at some stage hopefully), but that's not the issue. The issue is that when I add an AlphaState to the quad, the brightness of the texture is increased. Yeah, I know, wierd, but check it out:
You get those kind of results because the fragment color is being multiplied by a value larger than 1.0, thus resulting in higher luminance.
To get 1.0, use SRC_ALPHA as the source blend function and ONE_MINUS_SRC_ALPHA as the destination blend function (SRC_ALPHA + ONE_MINUS_SRC_ALPHA = 1.0).
I’ve actually just changed Paint Shop Pro to save the PNG’s transparency to the alpha channel, rather than the palette. But still no joy. Here’s the image:
Well, those settings should be ok… We use the same settings for alpha channel blended Text (without the test enabled.) Perhaps it is your shader you said you are using to provide texture?
Wow. Thanks for taking the effort to look into this for me Ren. It's much appreciated. I shall do as you say and start removing code to get down to basics. I shall report back …