Hi
Depending on some properties, I want to set a fragment to invisible.
To do that, I set the alpha value to 0. But it doesn’t work. Why? Do I have to set special properties?
My pseudocode:
[i]
SUBC tmp.x, val1, val2
IF GT.x
MOV frag_color.a, 0.0;
ENDIF
No… it doesn’t work.
I have glEnable(GL_DEPTH_TEST) and glEnable(GL_ALPHA_TEST),but things are still not tranpsarent.
But it works with glEnable(GL_BLEND) and glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
But I don’t want to use blending…
Because the alpha test is one of the first operation to be done and I didn’t find any precise information about KIL.
I need the fastest way of “disable/kill” a fragment. And set the alpha value to zero seem to be the fastest. But if somebody has any information about it…
Thanks
This means only fragments with an alpha-value greater than 0.1f will pass the test.
If you don’t specify the alpha-function, it might be some default function like GL_ALWAYS and hence will not work.