I have this simple shader here…
`Shader "MyShaders/Overlay" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Texture", 2D) = "white" {}
}
Category {
Tags {"Queue"="Overlay" "RenderType"="Transparent"}
ZWrite Off
Alphatest Greater 0
Blend SrcAlpha OneMinusSrcAlpha
SubShader {
Material {
Diffuse [_Color]
Ambient [_Color]
}
Pass {
Cull Back
ColorMaterial AmbientAndDiffuse
Lighting Off
SetTexture [_MainTex] {
Combine texture * primary, texture * primary
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine previous * constant, previous * constant
}
}
}
}
}`
…wich doesn’t work as supposed to do.
I need it to render above everything in the scene, (and it should do it, since “Queue” is set up to “Overlay”), but I’ve the feeling that it’s completely ignoring the “Queue” tag. No matter how I change it, it always renders like its queue is “Transparent”.
Other objects in the scene are all rendered in Geometry and Transparent queue, and their depth sorting is perfect. This is the only one not working.
Any suggestions? Did I write something wrong? Thanks!
Fantastic, it's working exactly as I want. Thank you very much, and thanks also for the explanation. :)
– DanjelRicci