I got this Scanlines shader off this forum.
Where it says Depth it used to say Overlay. Now I have no idea what I’m doing but the Shader was overlaying over everything in the scene so i typed depth to see if it would do anything. To my amazement it did.
But now I have this error:
Undefined Queue: ‘Depth’
UnityEditor.DockArea:OnGUI()
Do I need to worry about it? How Do I make it go away.
{
Properties
{
_LinesColor("LinesColor", Color) = (0,0,0,1)
_LinesSize("LinesSize", Range(1,10)) = 1
}
SubShader {
Tags {"IgnoreProjector" = "True" "Queue" = "Depth"}
Fog { Mode Off }
Pass {
ZTest Always
ZWrite On
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
fixed4 _LinesColor;
half _LinesSize;
struct v2f
{
half4 pos:POSITION;
fixed4 sPos:TEXCOORD;
};
v2f vert(appdata_base v)
{
v2f o;
o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
o.sPos = ComputeScreenPos(o.pos);
return o;
}
fixed4 frag(v2f i) : COLOR
{
fixed p = i.sPos.y / i.sPos.w;
if((int)(p*_ScreenParams.y/floor(_LinesSize))%2==0)
discard;
return _LinesColor;
}
ENDCG
}
}
}