透视效果图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/b58372f7f33e223876595e830a9c5af6.png)
shader
Shader "Unlit/SeeThrough"
{
Properties
{
_Color("Color", Color) = (1,0,0,1)
}
SubShader
{
Tags { "RenderType"="Opaque" "Queue" = "Geometry+98" }
LOD 100
ZTest Greater
ZWrite Off
Cull Back
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float3 normal : NORMAL;
};
struct v2f
{
float4 vertex : SV_POSITION;
};
float4 _Color;
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
{
return _Color;
}
ENDCG
}
}
}
使用方式
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/bc57e6e767b4479fa88669d510b421ee.png)