|
|
|
|
|
|
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); |
|
|
|