Custom GLSL Materials with Shadows

Hello, for the green square, changing the bias value doesn’t solve the issue?

For the one frame delay, I have to look at the sources but I fear that it could be complex to solve (EDIT: What if you use a python script with worldPosition += something to move your objects? not applyMovement, neither applyRotation. Iirc there was a bug with the scene graph not updated in bge sources with NodeUpdateGS(0.0) at the end of applyMovement and applyRotation)

Hi and thanks for the reply.

No I think the bias value is not the problem and also using worldPosition += something doesn’t help.

But I have discovered that it has something to do with the shadowmap clipping because when the custom shader object is inside the shadow clipping it comes to the problem with the green square. But as long as the object is outside of the shadow clipping it’s works right.

I think the green square is the shadow of the plane itself because when I deactivate shadow casting on the plane there is no problem. I can’t say exactly what happening but in the generall all problems with the green square belong to the issue with the shadow clipping.

About the other problem where the shadows moving with the camera border when the object is outside the direct camera focus I can’t say something. Looks like something is not being updated (when the object is outside the direct camera focus).