Alpha test function other than GL_GREATER

Is there a possibility to apply alpha testing with test function other than GL_GREATER ? I expected to find some setter for glAlphaFunc in RenderState, but I can’t find one. Some old documentation contains AlphaState class - removed some day.

The com.jme3.material.RenderState.TestFunction javadoc says: TestFunction specifies the testing function for stencil test function and alpha test function. - but how to apply that alpha test function ?

The problem is, alpha test has been deprecated in OpenGL 3.0 and its not supported by OpenGL ES 2.0. You can accomplish the same functionality in a shader, why not do it that way then?

Thanks, it seems that I’m a bit behind the progress. Case is closed

OK, what about depth test function ? I can’t see a possibility to alter depth test either


@wezrule said: [java]mat.getAdditionalRenderState().setDepthTest(false);[/java]

I think he wants to be able to change the test function… but we don’t support that for some reason.

We do use this, and it’ snot deprecated (at least in ogl 4) and…it could easily be made an additionalRenderState parameter…
@Momoko_Fan what do you say?

pspeed is right, the question was about the possibility to change depth test function (glDepthFunc)
Changing depth test function is useful for techniques like depth peeling

It seems natural to have something like:


and in material definitions:

[java]RenderState {
DepthFunc GreaterOrEqual
} [/java]

…where DepthFunc is actually DepthTestFunction.

Yeah, I agree.