浏览代码

Small changes to checkerboard shader

/main
Peter Bay Bastian 7 年前
当前提交
2876e2d3
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Shaders/Checkerboard.shader

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Shaders/Checkerboard.shader


static const float rows = 32;
static const float columns = 32;
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);
static const float4 col1 = float4(0.389297, 0.389297, 0.389297, 1.0);
static const float4 col2 = float4(0.442601, 0.442601, 0.442601, 1.0);
bool isEven = total % 2.0 == 0.0;
return isEven ? col1 : col2;
return lerp(col1, col2, step(fmod(total, 2.0), 0.5));
}
ENDCG
}
正在加载...
取消
保存