Your comments

I just realized that when I deactivate the "Draw call batching", the problem with more than one object is solved.

I just realized that when I deactivate the "Draw call batching", the problem with more than one object is solved.

I'm facing the same problem! When there is just one object in the scene, its all ok. When I add a second object, it gets weird. But I realized that the problem occur only when both objects are inside the camera view. When the other is moved outside the view, it gets all right again.

I need to get the vertex position on local mesh coordinate to paint the object by a gradient proportional to the vertex height. Something like this:

I used the WorldPosition node, subtract by the ObjectPosition, then applied a Transform (from World to Local). Then extract the Y coordinate. It seems to work when I have only one object in the scene using the shader. It also works for rotations. When I move or rotate the object, the gradient keeps right, doesn't change. But then I create a second object using the same shader and the colors of both objects turned green and the gradient is gone. So I realized that when the other object is outside the camera view, the one inside the view displays the right gradient again. If I move the other back to view, both are green again.


Any help to make me understand what is happening would be great!

Thanx in advance.