Skip to content

Commit b0e5ac5

Browse files
committed
Reorder surface param
1 parent 5106124 commit b0e5ac5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/LitSurfaceInputsUIBlock.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,13 @@ void DrawSurfaceInputsGUI()
375375

376376
materialEditor.TexturePropertySingleLine(Styles.baseColorText, baseColorMap[m_LayerIndex], baseColor[m_LayerIndex]);
377377

378+
if (baseColorMap[m_LayerIndex].textureValue != null && materials.All(m => m.GetSurfaceType() == SurfaceType.Transparent))
379+
{
380+
materialEditor.MinMaxShaderProperty(alphaRemapMin[m_LayerIndex], alphaRemapMax[m_LayerIndex], 0.0f, 1.0f, Styles.transparencyRemappingText);
381+
}
382+
383+
materialEditor.TexturePropertySingleLine((materials.All(m => m.GetMaterialId() == MaterialId.LitSpecular)) ? Styles.maskMapSpecularText : Styles.maskMapSText, maskMap[m_LayerIndex]);
384+
378385
bool hasMetallic = materials.All(m =>
379386
m.GetMaterialId() == MaterialId.LitStandard ||
380387
m.GetMaterialId() == MaterialId.LitAniso ||
@@ -395,13 +402,6 @@ void DrawSurfaceInputsGUI()
395402
materialEditor.MinMaxShaderProperty(aoRemapMin[m_LayerIndex], aoRemapMax[m_LayerIndex], 0.0f, 1.0f, Styles.aoRemappingText);
396403
}
397404

398-
if (baseColorMap[m_LayerIndex].textureValue != null && materials.All(m => m.GetSurfaceType() == SurfaceType.Transparent))
399-
{
400-
materialEditor.MinMaxShaderProperty(alphaRemapMin[m_LayerIndex], alphaRemapMax[m_LayerIndex], 0.0f, 1.0f, Styles.transparencyRemappingText);
401-
}
402-
403-
materialEditor.TexturePropertySingleLine((materials.All(m => m.GetMaterialId() == MaterialId.LitSpecular)) ? Styles.maskMapSpecularText : Styles.maskMapSText, maskMap[m_LayerIndex]);
404-
405405
materialEditor.ShaderProperty(normalMapSpace[m_LayerIndex], Styles.normalMapSpaceText);
406406

407407
// Triplanar only work with tangent space normal

com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/UnlitSurfaceInputsUIBlock.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ public override void LoadMaterialProperties()
5151
protected override void OnGUIOpen()
5252
{
5353
materialEditor.TexturePropertySingleLine(Styles.colorText, colorMap, color);
54-
materialEditor.TextureScaleOffsetProperty(colorMap);
5554

5655
if (colorMap.textureValue != null)
5756
{
5857
materialEditor.MinMaxShaderProperty(alphaRemapMin, alphaRemapMax, 0.0f, 1.0f, Styles.transparencyRemappingText);
5958
}
59+
60+
materialEditor.TextureScaleOffsetProperty(colorMap);
6061
}
6162
}
6263
}

0 commit comments

Comments
 (0)