Geometry casts shadow on itself?

Hello! I have two geometries. One with a cast shadow mode only (the wedge) and other with a cast and receive shadow mode (the cube). Look what happens under the directional light:

Is it a bug in jme or my sh*** AMD still plays tricks on me?

P.S. I’m working under Ubuntu on a laptop with a Radeon HD 7500M/7600M

What version of JME are you using? Are you using the shadow filter or the shadow processor? (Shadow filter does not support selective receive.)

This is the expected result of the current implementation of the shadow renderer because the shadow is applied after the scene has been rendered.
I’m currently working on an improved version which is not ready yet but will look much better.

Known issue.

You have two options:

  • learn about shadows, shader programming and write your own shadows, like I did. It would give you much fun and knowledge.
  • wait for contributors to finish their work, don’t worry, just start to implement other things.

I’m using a stable version 3.0 of JME with a DirectionalLightShadowRenderer. Actually, it’s even worse with a DirectionalLightShadowFilter since I loose the good part of the ambient shading:

@Perjin Looks nice! Hopefuly, you’ll make a use case more general by adding multi-light support :smile:

@FrozenShade Thanks. Hopefully, we’ll have something decent soon, 'cause the current state is quite unusable. For now, I’ll have to turn off the CastAndReceive option.

In fact, the problem is due to the combined use of direct light and ambient light. When I use only direct light, there is no problem. Please read again the first post in this thread.

Ah alright sorry I misinterpreted the picture as you did not mention the AmbientLight in your topic.

:slight_smile: No prob. The fault is, in fact, mine. I really thought I’ve mentioned it.

You are not the only one with this problem …