浏览代码

fix undo/redo with layeredLit

/stochastic_alpha_test
Sebastien Lagarde 7 年前
当前提交
a6118c02
共有 1 个文件被更改,包括 16 次插入8 次删除
  1. 24
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/LitUI.cs

24
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/LitUI.cs


if (!heightMap[layerIndex].hasMixedValue && heightMap[layerIndex].textureValue != null)
{
EditorGUI.indentLevel++;
EditorGUI.BeginChangeCheck();
heightAmplitude[layerIndex].floatValue = (heightMax[layerIndex].floatValue - heightMin[layerIndex].floatValue) * 0.01f; // Conversion centimeters to meters.
if (EditorGUI.EndChangeCheck())
{
heightAmplitude[layerIndex].floatValue = (heightMax[layerIndex].floatValue - heightMin[layerIndex].floatValue) * 0.01f; // Conversion centimeters to meters.
}
m_MaterialEditor.ShaderProperty(heightCenter[layerIndex], Styles.heightMapCenterText);
EditorGUI.showMixedValue = false;
EditorGUI.indentLevel--;

W = (uvBaseMapping == UVBaseMapping.UV3) ? 1.0f : 0.0f;
UVMappingMask[layerIndex].colorValue = new Color(X, Y, Z, W);
EditorGUI.BeginChangeCheck();
// Precompute.
InvTilingScale[layerIndex].floatValue = 2.0f / (Mathf.Abs(baseColorMap[layerIndex].textureScaleAndOffset.x) + Mathf.Abs(baseColorMap[layerIndex].textureScaleAndOffset.y));
if ((uvBaseMapping == UVBaseMapping.Planar) || (uvBaseMapping == UVBaseMapping.Triplanar))
if (EditorGUI.EndChangeCheck())
InvTilingScale[layerIndex].floatValue = InvTilingScale[layerIndex].floatValue / TexWorldScale[layerIndex].floatValue;
// Precompute.
InvTilingScale[layerIndex].floatValue = 2.0f / (Mathf.Abs(baseColorMap[layerIndex].textureScaleAndOffset.x) + Mathf.Abs(baseColorMap[layerIndex].textureScaleAndOffset.y));
if ((uvBaseMapping == UVBaseMapping.Planar) || (uvBaseMapping == UVBaseMapping.Triplanar))
{
InvTilingScale[layerIndex].floatValue = InvTilingScale[layerIndex].floatValue / TexWorldScale[layerIndex].floatValue;
}
}
EditorGUI.indentLevel--;

// TODO: display warning if we don't have bent normal (either OS or TS) and ambient occlusion
//if (enableSpecularOcclusion.floatValue > 0.0f)
{
//EditorGUILayout.HelpBox(Styles.specularOcclusionWarning.text, MessageType.Error);
//EditorGUILayout.HelpBox(Styles.specularOcclusionWarning.text, MessageType.Error);
EditorGUI.indentLevel++;
EditorGUI.indentLevel++;
m_MaterialEditor.TexturePropertySingleLine(Styles.emissiveText, emissiveColorMap, emissiveColor);
m_MaterialEditor.ShaderProperty(emissiveIntensity, Styles.emissiveIntensityText);
m_MaterialEditor.ShaderProperty(albedoAffectEmissive, Styles.albedoAffectEmissiveText);

正在加载...
取消
保存