Custom shader is self shadowing even tough its ShadowMode is set on "Cast"?

Hi all,

Anybody knows what should be put in a material definition file for a custom shader to properly not receive shadows but still cast them, in other words, to avoid self shadowing?

I have a case here where if I set ShadowMode.Off no shadow are casted nor received which is fine, but if I set ShadowMode.Cast it does exactly the same as ShadowMode.CastAndReceive.

It does not use Lighting.j3md but rather a custom shader I have adapted from grassBase.j3md.

I’m thinking it may need some extra GLSL code to properly manage the shadow render passes or something, not sure what it misses to behave correctly.

Any ideas?

Thx

I’m sorry. I just realized it was set on RenderQueue.Bucket.Transparent.

It HAS to be set on RenderQueue.Bucket.Translucent for it to be rendered last and thus, not imply self shadowing.

I have no idea how I missed this as I remember testing this out before submiting my question. I must have overlooked that the parent node was setting it back to Transparent by mistake. Anyhow, with the Translucent render bucket it works perfectly.

Thanks and hope this serves its purpose of answering somebody else’s question.

TTYL :stuck_out_tongue: