-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpureWhite.shader
More file actions
35 lines (29 loc) · 1.03 KB
/
Copy pathpureWhite.shader
File metadata and controls
35 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "LX/pureWhite"
{
SubShader
{
Pass
{
CGPROGRAM
//pragma预处理指令用于设定编译器状态
//此处为unity shader特有的指令,意思为指定顶点着色器和片元着色器的名字
#pragma vertex vert
#pragma fragment frag
//为了使用UnityObjectToClipPos方法需要进行Include
#include <UnityShaderUtilities.cginc>
//Position代表希望输入的值是顶点坐标
//SV_POSITION代表裁剪空间中顶点的坐标
float4 vert(float4 v:POSITION):SV_POSITION
{
return UnityObjectToClipPos(v);
}
//fixed4(1, 1, 1, 1)返回白色,所以每个面的颜色相同
fixed4 frag():SV_Target
{
return fixed4(1, 1, 1, 1);
}
ENDCG
}
}
}