What is the correct method of predictably controlling depth sorting? My shader is as follows:
Shader "Unlit Modulated Texture" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_Color ("Color", Color) = (1,1,1)
}
SubShader {
Lighting Off
cull off
ztest always
Zwrite on
Fog { Mode Off }
Tags {"Queue" = "Geometry" }
Pass {
Blend SrcAlpha OneMinusSrcAlpha
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * constant, texture * constant
}
}
}
}
I’m using a perspective camera, FOV 15 and near/far clip at 20/100 respectively. I’m getting really bad depth sorting issues. I could manually set the renderqueue for each object but that’ll leave me with a nightmare of constantly updating which object is nearer the camera.
I assume I’ve just done something silly in my shader?
EDIT: All objects are solid, no transparency mapping.