|
|
|
|
|
|
if (terrainLayer.diffuseTexture != null) |
|
|
|
{ |
|
|
|
var rect = GUILayoutUtility.GetLastRect(); |
|
|
|
rect.y += 16 + 4; |
|
|
|
rect.width = EditorGUIUtility.labelWidth + 64; |
|
|
|
rect.y += 16; |
|
|
|
|
|
|
|
var tintRect = EditorGUI.PrefixLabel(rect, styles.colorTint); |
|
|
|
--EditorGUI.indentLevel; |
|
|
|
tintRect.width = 64; |
|
|
|
|
|
|
|
diffuseTint = EditorGUI.ColorField(tintRect, GUIContent.none, diffuseTint, true, false, false); |
|
|
|
diffuseTint = EditorGUI.ColorField(rect, styles.colorTint, diffuseTint, true, false, false); |
|
|
|
diffuseRemapMax.x = diffuseTint.r; |
|
|
|
diffuseRemapMax.y = diffuseTint.g; |
|
|
|
diffuseRemapMax.z = diffuseTint.b; |
|
|
|
|
|
|
{ |
|
|
|
rect.y += 16; |
|
|
|
++EditorGUI.indentLevel; |
|
|
|
var densityToggleRect = EditorGUI.PrefixLabel(rect, styles.opacityAsDensity); |
|
|
|
--EditorGUI.indentLevel; |
|
|
|
densityToggleRect.width = 64; |
|
|
|
enableDensity = EditorGUI.Toggle(densityToggleRect, diffuseRemapMin.w > 0); |
|
|
|
rect.y = rect.yMax + 2; |
|
|
|
enableDensity = EditorGUI.Toggle(rect, styles.opacityAsDensity, diffuseRemapMin.w > 0); |
|
|
|
|
|
|
|
--EditorGUI.indentLevel; |
|
|
|
} |
|
|
|
diffuseRemapMax.w = 1; |
|
|
|
diffuseRemapMin.w = enableDensity ? 1 : 0; |
|
|
|
|
|
|
|
|
|
|
if (terrainLayer.normalMapTexture != null) |
|
|
|
{ |
|
|
|
var rect = GUILayoutUtility.GetLastRect(); |
|
|
|
rect.y += 16 + 4; |
|
|
|
rect.width = EditorGUIUtility.labelWidth + 64; |
|
|
|
rect.height = 16; |
|
|
|
|
|
|
|
terrainLayer.normalScale = EditorGUILayout.FloatField(styles.normalScale, terrainLayer.normalScale); |
|
|
|
terrainLayer.normalScale = EditorGUI.FloatField(rect, styles.normalScale, terrainLayer.normalScale); |
|
|
|
EditorGUILayout.Space(); |
|
|
|
} |
|
|
|
|
|
|
|
terrainLayer.maskMapTexture = EditorGUILayout.ObjectField(heightBlend ? styles.maskMapTexture : styles.maskMapTextureWithoutHeight, terrainLayer.maskMapTexture, typeof(Texture2D), false) as Texture2D; |
|
|
|