浏览代码

Add a minimum value when calculing the height blend factors to avoid a division by zero when all layers are set to zero in the layer mask map.

/main
Remy 7 年前
当前提交
0a6396d8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLitData.hlsl

2
com.unity.render-pipelines.high-definition/HDRP/Material/LayeredLit/LayeredLitData.hlsl


// Normalize
maxHeight = GetMaxHeight(maskedHeights);
maskedHeights = maskedHeights / maxHeight.xxxx;
maskedHeights = maskedHeights / max(maxHeight.xxxx, 1e-6);
return maskedHeights.yzwx;
}

正在加载...
取消
保存