alpha_rejection in texture_unit?

Problems building or running the engine, queries about how to use features etc.
Post Reply
DarkSun
Kobold
Posts: 35
Joined: Wed Mar 10, 2004 12:10 pm
Location: Bielefeld, Germany

alpha_rejection in texture_unit?

Post by DarkSun »

Hi All,

i was wondering why is alpha_rejection declared in texture_unit. AFAIK alpha test is done per fragment, not per texture unit...
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

You're right, it should be on the Pass, not the TextureUnitState. I can't remember why it ended up there, it probably got mistakenly associated with the per-unit alpha operation at some point in the past and was never reviewed.

I'll have to think about what to do about that to minimise compatibility issues..
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Ok, I've moved alpha_rejection in Azathoth (1.0.0) up to the Pass. This is an interface breaking change, but not hard to resolve. We have a few others in Azathoth anyway :)

Hastur will remain as-is. It's strictly wrong, but we can't change it without breaking the interface, which is forbidden in maintenance releases.
karmaGfa
Halfling
Posts: 49
Joined: Fri Nov 05, 2004 9:19 am
Location: Taiwan

upside-down ?

Post by karmaGfa »

Hello,

in the 0.15 version, when I use the line :

alpha_rejection greater_equal 128

the rejected pixels are the ones whose alpha is < 128 (checked with TheGimp v2.0 with the tool "pick color") ... is it normal or it is an inversion bug ? :lol:

Vincent
karmaGfa
Halfling
Posts: 49
Joined: Fri Nov 05, 2004 9:19 am
Location: Taiwan

Post by karmaGfa »

I think I understand ... this is the documentation that is not clear :

In the doc, there is :

Default: alpha_rejection always_pass

.. so I guess that the condition is not for the rejected pixels but the opposite, for the accepted pixel. The documentation should precise it or the command name should be changed into alpha_acceptation ! :lol:
Post Reply