浏览代码

Fixed up LightweightStandardShaderGUI to only support BakedEmissive lightmap mode.

/RenderPassXR_Sandbox
Felipe Lira 7 年前
当前提交
6076bb69
共有 2 个文件被更改,包括 7 次插入21 次删除
  1. 26
      ScriptableRenderPipeline/LightweightPipeline/Editor/ShaderGUI/LightweightStandardShaderGUI.cs
  2. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/024_Shader_PBRvalidation_Specular/Adam/Materials/Crowd_LOD0_Mat_Torso_spec.mat

26
ScriptableRenderPipeline/LightweightPipeline/Editor/ShaderGUI/LightweightStandardShaderGUI.cs


DoMetallicSpecularArea();
DoNormalArea();
// ATM not supported
//m_MaterialEditor.TexturePropertySingleLine(Styles.heightMapText, heightMap, heightMap.textureValue != null ? heigtMapScale : null);
// ATM not supported
//m_MaterialEditor.TexturePropertySingleLine(Styles.detailMaskText, detailMask);
DoEmissionArea(material);
EditorGUI.BeginChangeCheck();
m_MaterialEditor.TextureScaleOffsetProperty(albedoMap);

EditorGUILayout.Space();
// ATM not supported
//// Secondary properties
//GUILayout.Label(Styles.secondaryMapsText, EditorStyles.boldLabel);
//m_MaterialEditor.TexturePropertySingleLine(Styles.detailAlbedoText, detailAlbedoMap);
//m_MaterialEditor.TexturePropertySingleLine(Styles.detailNormalMapText, detailNormalMap, detailNormalMapScale);
//m_MaterialEditor.TextureScaleOffsetProperty(detailAlbedoMap);
//m_MaterialEditor.ShaderProperty(uvSetSecondary, Styles.uvSetLabel.text);
// Third properties
GUILayout.Label(Styles.forwardText, EditorStyles.boldLabel);
if (highlights != null)
m_MaterialEditor.ShaderProperty(highlights, Styles.highlightsText);
if (reflections != null)
m_MaterialEditor.ShaderProperty(reflections, Styles.reflectionsText);
m_MaterialEditor.ShaderProperty(highlights, Styles.highlightsText);
m_MaterialEditor.ShaderProperty(reflections, Styles.reflectionsText);
}
if (EditorGUI.EndChangeCheck())
{

if (emissionMap.textureValue != null && !hadEmissionTexture && brightness <= 0f)
emissionColorForRendering.colorValue = Color.white;
// change the GI flag and fix it up with emissive as black if necessary
m_MaterialEditor.LightmapEmissionFlagsProperty(MaterialEditor.kMiniTextureFieldLabelIndentLevel, true);
// LW does not support RealtimeEmissive. We set it to bake emissive and handle the emissive is black right.
material.globalIlluminationFlags = MaterialGlobalIlluminationFlags.BakedEmissive;
if (brightness <= 0f)
material.globalIlluminationFlags |= MaterialGlobalIlluminationFlags.EmissiveIsBlack;
}
}

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/024_Shader_PBRvalidation_Specular/Adam/Materials/Crowd_LOD0_Mat_Torso_spec.mat


m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _EMISSION _GLOSSYREFLECTIONS_ON _METALLICSPECGLOSSMAP _NORMALMAP
_SPECULARHIGHLIGHTS_ON _SPECULAR_SETUP
m_LightmapFlags: 1
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1

正在加载...
取消
保存