UnityEditor.BabylonShaderInterface.DoSpecularMetallicArea C# (CSharp) Method

DoSpecularMetallicArea() private method

private DoSpecularMetallicArea ( ) : void
return void
		void DoSpecularMetallicArea()
		{
			bool hasGlossMap = false;
			if (m_WorkflowMode == WorkflowMode.Specular)
			{
				hasGlossMap = specularMap.textureValue != null;
				m_MaterialEditor.TexturePropertySingleLine(Styles.specularMapText, specularMap, hasGlossMap ? null : specularColor);
			}
			else if (m_WorkflowMode == WorkflowMode.Metallic)
			{
				hasGlossMap = metallicMap.textureValue != null;
				m_MaterialEditor.TexturePropertySingleLine(Styles.metallicMapText, metallicMap, hasGlossMap ? null : metallic);
			}

			bool showSmoothnessScale = hasGlossMap;
			if (smoothnessMapChannel != null)
			{
				int smoothnessChannel = (int) smoothnessMapChannel.floatValue;
				if (smoothnessChannel == (int) SmoothnessMapChannel.AlbedoAlpha)
					showSmoothnessScale = true;
			}

			int indentation = 2; // align with labels of texture properties

			// Roughness properties
			if (roughness != null)
				m_MaterialEditor.ShaderProperty(roughness, Styles.roughnessText, indentation);
			if (useRoughnessAlpha != null)
				m_MaterialEditor.ShaderProperty(useRoughnessAlpha, Styles.useRoughnessAlphaText, indentation);
			if (useRoughnessGreen != null)
				m_MaterialEditor.ShaderProperty(useRoughnessGreen, Styles.useRoughnessGreenText, indentation);
			if (roughness != null || useRoughnessAlpha != null || useRoughnessGreen != null)
  				EditorGUILayout.Space();

			m_MaterialEditor.ShaderProperty(showSmoothnessScale ? smoothnessScale : smoothness, showSmoothnessScale ? Styles.smoothnessScaleText : Styles.smoothnessText, indentation);
		
			++indentation;
			if (smoothnessMapChannel != null)
				m_MaterialEditor.ShaderProperty(smoothnessMapChannel, Styles.smoothnessMapChannelText, indentation);
		}