SimpleTextured, Bucket.Transparent & FogFilter issue [Solution in last post]

If you use the SimpleTextured material def on an object to use material transparency and are also using a FogFilter, the object is effected by the FogFilter and the geometry shape is visible. This happens whether or not you add the object to the render bucket for Transparent objects.



I assume this is not working as intended, yes?

SimpleTextured.j3md is deprecated, use Unshaded.j3md

I’ve tried both, same issue for both… let me grab a screen cap





I take the FogFilter out and it goes away.

I switched the material type to Lighting and used:

materialName.getAdditionalRenderState().setDepthWrite(false);



This fixed this issue for the purpose I need.

Yes the fog filter use depth, so if the transparent object write depth it’s visible.



The way you did it is good, but won’t fit for semi transparent objects.



For those consider using the AlphaDiscardThreshold parameter of the lighting material definition.

setting it to 0.1f for example will discard form render all the pixels that have a alpha value below 0.1