alphablended sorting issues.

Is there some way of making sure one mesh is drawn after another?

I have an alphablended mesh (floor) which is flat in the middle. Then I have another alphablended plane, this is a dropshadow on my player. However, this dropshadow is sometimes not rendered when I move across the “floor”. It sorts correctly in some areas, and disappears in other areas.

The floor should always be rendered first, so it would be great if I somehow could override render order.

Or solve this in another way. Suggestions are welcome.

Thanks!

Kjetil

You can adjust the render queue via script, by attaching a script to your shadow object and do this:

function Awake(){
    renderer.material.renderQueue++;
}

The other option is, to write another shader (or copy it form the builtin shader you can download on the Unity website) and modify the shader’s render queue. So if the shader used by your shadow object contains the line

"Queue" = "Transparent"

replace that with

"Queue" = "Transparent+1"

renderer.material.renderQueue++;

seems to work perfectly. thank you so much! :slight_smile: