浏览代码

Merge pull request #1083 from Unity-Technologies/Branch_FixTessAmplitudeZero

Fixed heightmap offset when amplitude is zero.
/2018.1
GitHub 7 年前
当前提交
07c40e47
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/LitUI.cs

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/LitUI.cs


float amplitude = (heightMax[layerIndex].floatValue - heightMin[layerIndex].floatValue);
heightAmplitude[layerIndex].floatValue = amplitude * 0.01f; // Conversion centimeters to meters.
heightCenter[layerIndex].floatValue = -(heightMin[layerIndex].floatValue + offset) / amplitude;
heightCenter[layerIndex].floatValue = -(heightMin[layerIndex].floatValue + offset) / Mathf.Max(1e-6f, amplitude);
heightCenter[layerIndex].floatValue = -heightOffset[layerIndex].floatValue / amplitude + heightTessCenter[layerIndex].floatValue;
heightCenter[layerIndex].floatValue = -heightOffset[layerIndex].floatValue / Mathf.Max(1e-6f, amplitude) + heightTessCenter[layerIndex].floatValue;
}
}
}

正在加载...
取消
保存