I want to draw a custom shadow under my object which is a textured quad, however, I want to draw it always over the level but under objects. renderQueue does not seem to work.
Basically I want to to obey the z buffer but also render after level but before the objects. Its for the iphone so I would want to find a fast way of doing this…
The shadow mesh is a textured quad which will not deform using only two triangles. It will use the normals of the environment mesh to rotate to face up.
This will cause the quad to clip the environment mesh. Therefore it must have a specific rendering order for that specific mesh.
And I would like to ensure that player meshes are always drawn over the shadow quad, however, the player mesh must also drawn correctly with the environment, and this is the the interesting part of the problem.
Why is a projector not right for this case? You found it to be too slow?
I don’t see how “respect Z-buffer” and not wanting to “clip the environment mesh” are compatible. It sounds to me like the best solution would be to move the environment to an earlier queue, put the shadow in a queue after that, with ZTest Always, and then leave the characters in the Geometry queue, after both of the others. Which, I think is exactly what you’re saying. I never actually use renderQueue, so I can’t vouch for whether it works or not, but I haven’t had a problem with this kind of thing, setting the queues explicitly in shaders. If it really doesn’t work, you should file a bug, but I’d be happy to check out a problem .unitypackage for you.