Shader "Unlit/Test"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_color("Color", Color) = (1,1, 1, 1)
[HideInInspector] _QueueTag ("QueueTag", Float) = 0.0
[HideInInspector] _QueueTagOffset ("QueueTagOffset", Float) = 0.0
}
SubShader
{
Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
ZWrite Off
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
// make fog work
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uv : TEXCOORD0;
UNITY_FOG_COORDS(1)
float4 vertex : SV_POSITION;
};
sampler2D _MainTex;
float4 _MainTex_ST;
float4 _color;
v2f vert (appdata v)
{
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.uv
扩展 Shader 编辑器
最新推荐文章于 2022-11-25 01:17:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)