您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

31 行
750 B

Shader "Hidden/Checkerboard"
{
SubShader
{
// No culling or depth
Cull Off ZWrite Off ZTest Always
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
uniform float _X;
uniform float _Y;
static const float4 col1 = float4(0.15, 0.15, 0.15, 1.0);
static const float4 col2 = float4(0.3, 0.3, 0.3, 1.0);
float4 frag(v2f_img i) : COLOR
{
float total = floor(i.uv.x * _X) + floor(i.uv.y * _Y);
bool isEven = total % 2.0 == 0.0;
return isEven ? col1 : col2;
}
ENDCG
}
}
}