浏览代码

HDRenderLoop: Fixed Lit shader GUI when switching various input options.

/main
Julien Ignace 8 年前
当前提交
e235debb
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 18
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LitUI.cs

18
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LitUI.cs


public static string InputsMapText = "";
public static GUIContent baseColorText = new GUIContent("Base Color", "Albedo (RGB) and Smoothness (A)");
public static GUIContent baseColorText = new GUIContent("Base Color + Opacity", "Albedo (RGB) and Opacity (A)");
public static GUIContent baseColorSmoothnessText = new GUIContent("Base Color + Smoothness", "Albedo (RGB) and Smoothness (A)");
public static GUIContent metalicText = new GUIContent("Metalic", "Metalic scale factor");

protected void ShaderInputGUI()
{
EditorGUI.indentLevel++;
bool isAlbedoAlpha = (SmoothnessMapChannel)smoothnessMapChannel.floatValue == SmoothnessMapChannel.AlbedoAlpha;
bool smoothnessInAlbedoAlpha = (SmoothnessMapChannel)smoothnessMapChannel.floatValue == SmoothnessMapChannel.AlbedoAlpha;
m_MaterialEditor.TexturePropertySingleLine(isAlbedoAlpha ? Styles.baseColorSmoothnessText : Styles.baseColorText, baseColorMap, baseColor);
m_MaterialEditor.TexturePropertySingleLine(smoothnessInAlbedoAlpha ? Styles.baseColorSmoothnessText : Styles.baseColorText, baseColorMap, baseColor);
if (isAlbedoAlpha && useEmissiveMask)
m_MaterialEditor.TexturePropertySingleLine(Styles.maskMapESText, maskMap);
else if (useEmissiveMask)
if (smoothnessInAlbedoAlpha && useEmissiveMask)
else if (isAlbedoAlpha)
m_MaterialEditor.TexturePropertySingleLine(Styles.maskMapSText, maskMap);
else
else if (smoothnessInAlbedoAlpha && !useEmissiveMask)
else if (!smoothnessInAlbedoAlpha && useEmissiveMask)
m_MaterialEditor.TexturePropertySingleLine(Styles.maskMapESText, maskMap);
else if (!smoothnessInAlbedoAlpha && !useEmissiveMask)
m_MaterialEditor.TexturePropertySingleLine(Styles.maskMapSText, maskMap);
m_MaterialEditor.TexturePropertySingleLine(Styles.specularOcclusionMapText, specularOcclusionMap);

正在加载...
取消
保存