浏览代码

Fixing frequency limiter to allow the lerp values to actually hit their endpoints. Also switching to a slightly cheaper calculation that gives nearly identical results.

/main
Peter Bay Bastian 7 年前
当前提交
6e2cae42
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      com.unity.shadergraph/Editor/Data/Nodes/Procedural/CheckerboardNode.cs

4
com.unity.shadergraph/Editor/Data/Nodes/Procedural/CheckerboardNode.cs


{precision} width = 1.0;
{precision}2 distance3 = 4.0 * abs(frac(UV + 0.25) - 0.5) - width;
{precision}2 scale = 0.35 / duv_length.xy;
{precision} dependency = sqrt(clamp(0.8f - length(duv_length), 0.0, 1.0));
{precision} freqLimiter = sqrt(clamp(1.1f - max(duv_length.x, duv_length.y), 0.0, 1.0));
{precision} alpha = saturate(0.5f + 0.5f * vector_alpha.x * vector_alpha.y * dependency);
{precision} alpha = saturate(0.5f + 0.5f * vector_alpha.x * vector_alpha.y * freqLimiter);
Out = lerp(ColorA, ColorB, alpha.xxx);
}";
}
正在加载...
取消
保存