浏览代码

Fix Channel Mask validation

/main
Matt Dean 7 年前
当前提交
70e75999
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Mask/ChannelMaskNode.cs

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Mask/ChannelMaskNode.cs


void ValidateChannelCount()
{
int channelCount = SlotValueHelper.GetChannelCount(FindSlot<MaterialSlot>(InputSlotId).concreteValueType);
if (channelMask > 1 << channelCount - 1)
if (channelMask >= 1 << channelCount)
channelMask = -1;
}

正在加载...
取消
保存