Quad with alpha texture overlapping shadows

Hello,



I have a quad onto which I attached a texture which has transparent parts. All works fine but when I walk into a shadow the quad, including the transparent part, overlaps the shadow. How can I make it so that the transparent part of the quad does not overlap the shadow? See picture below.







The quad I am talking about is the one with the character sprite on it in the center of the screen. The shadow renderer I use is a pssm shadow renderer.

add an alphaDiscardThreshold to your sprite material.

material.setFloat("alphaDiscardThreshold ", 0.1f);

@nehon said:
add an alphaDiscardThreshold to your sprite material.
material.setFloat("alphaDiscardThreshold ", 0.1f);


Did unshaded also get an alphaDiscardThreshold? I didn't look at the commit.

If not then in the mean time you can use material.getAdditionalRenderState().setAlphaTest(true) and setAlphaFalloff(0.1f);