浏览代码

Update shadow parameter in UI

/main
sebastienlagarde 7 年前
当前提交
c4fab16a
共有 8 个文件被更改,包括 38 次插入17 次删除
  1. 20
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDLightEditor.Styles.cs
  2. 18
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDLightEditor.cs
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Light/HDAdditionalShadowData.cs
  4. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLit.shader
  5. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLitTessellation.shader
  6. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader
  7. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader
  8. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Unlit/Unlit.shader

20
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDLightEditor.Styles.cs


public readonly GUIContent contactShadowSampleCount = new GUIContent("Sample Count", "Number of samples when ray casting.");
// Bias control
public readonly GUIContent viewBiasMin = new GUIContent("view Bias");
public readonly GUIContent viewBiasMax = new GUIContent("view Bias Max");
public readonly GUIContent viewBiasScale = new GUIContent("view Bias Scale");
public readonly GUIContent normalBiasMin = new GUIContent("normal Bias");
public readonly GUIContent normalBiasMax = new GUIContent("normal Bias Max");
public readonly GUIContent normalBiasScale = new GUIContent("normal Bias Scale");
public readonly GUIContent sampleBiasScale = new GUIContent("sample Bias Scale");
public readonly GUIContent edgeLeakFixup = new GUIContent("edge Leak Fixup");
public readonly GUIContent edgeToleranceNormal = new GUIContent("edge Tolerance Normal");
public readonly GUIContent edgeTolerance = new GUIContent("edge Tolerance");
public readonly GUIContent viewBiasMin = new GUIContent("View Bias");
public readonly GUIContent viewBiasMax = new GUIContent("View Bias Max");
public readonly GUIContent viewBiasScale = new GUIContent("View Bias Scale");
public readonly GUIContent normalBiasMin = new GUIContent("Normal Bias");
public readonly GUIContent normalBiasMax = new GUIContent("Normal Bias Max");
public readonly GUIContent normalBiasScale = new GUIContent("Normal Bias Scale");
public readonly GUIContent sampleBiasScale = new GUIContent("Sample Bias Scale");
public readonly GUIContent edgeLeakFixup = new GUIContent("Edge Leak Fixup");
public readonly GUIContent edgeToleranceNormal = new GUIContent("Edge Tolerance Normal");
public readonly GUIContent edgeTolerance = new GUIContent("Edge Tolerance");
public Styles()
{

18
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDLightEditor.cs


DrawBakedShadowParameters();
// There is currently no additional settings for shadow on directional light
if (m_AdditionalLightData.showAdditionalSettings.boolValue && settings.lightType.enumValueIndex != (int)LightType.Directional)
if (m_AdditionalLightData.showAdditionalSettings.boolValue)
if (settings.lightType.enumValueIndex == (int)LightType.Point || settings.lightType.enumValueIndex == (int)LightType.Spot)
if (settings.lightType.enumValueIndex != (int)LightType.Directional)
{
EditorGUILayout.PropertyField(m_AdditionalShadowData.dimmer, s_Styles.shadowDimmer);
EditorGUILayout.PropertyField(m_AdditionalShadowData.dimmer, s_Styles.shadowDimmer);
}
EditorGUILayout.Slider(m_AdditionalShadowData.viewBiasMin, 0.0f, 5.0f, s_Styles.viewBiasMin);
//EditorGUILayout.PropertyField(m_AdditionalShadowData.viewBiasMax, s_Styles.viewBiasMax);

//EditorGUILayout.PropertyField(m_AdditionalShadowData.normalBiasScale, s_Styles.normalBiasScale);
//EditorGUILayout.PropertyField(m_AdditionalShadowData.sampleBiasScale, s_Styles.sampleBiasScale);
EditorGUILayout.PropertyField(m_AdditionalShadowData.edgeLeakFixup, s_Styles.edgeLeakFixup);
//EditorGUILayout.PropertyField(m_AdditionalShadowData.edgeToleranceNormal, s_Styles.edgeToleranceNormal);
//EditorGUILayout.PropertyField(m_AdditionalShadowData.edgeTolerance, s_Styles.edgeTolerance);
if (m_AdditionalShadowData.edgeLeakFixup.boolValue)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_AdditionalShadowData.edgeToleranceNormal, s_Styles.edgeToleranceNormal);
EditorGUILayout.Slider(m_AdditionalShadowData.edgeTolerance, 0.0f, 1.0f, s_Styles.edgeTolerance);
EditorGUI.indentLevel--;
}
EditorGUI.indentLevel--;
}
}

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Light/HDAdditionalShadowData.cs


// bias control default value based on empirical experiment
shadowData.viewBiasMin = 0.2f;
shadowData.viewBiasMax = 10.0f;
shadowData.viewBiasMax = 100.0f; // Not used, high value to have no effect
shadowData.viewBiasScale = 1.0f;
shadowData.normalBiasMin = 0.5f;
shadowData.normalBiasMax = 0.5f;

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLit.shader


SubShader
{
// This tags allow to use the shader replacement features
Tags{ "RenderType" = "HDLitShader" }
// Caution: The outline selection in the editor use the vertex shader/hull/domain shader of the first pass declare. So it should not bethe meta pass.
Pass
{

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLitTessellation.shader


SubShader
{
// This tags allow to use the shader replacement features
Tags{ "RenderType" = "HDLitShader" }
// Caution: The outline selection in the editor use the vertex shader/hull/domain shader of the first pass declare. So it should not bethe meta pass.
Pass
{

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader


SubShader
{
// This tags allow to use the shader replacement features
Tags{ "RenderType" = "HDLitShader" }
// Caution: The outline selection in the editor use the vertex shader/hull/domain shader of the first pass declare. So it should not bethe meta pass.
Pass
{

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader


SubShader
{
// This tags allow to use the shader replacement features
Tags{ "RenderType" = "HDLitShader" }
// Caution: The outline selection in the editor use the vertex shader/hull/domain shader of the first pass declare. So it should not bethe meta pass.
Pass
{

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Unlit/Unlit.shader


SubShader
{
// This tags allow to use the shader replacement features
Tags{ "RenderType" = "HDUnlitShader" }
// Caution: The outline selection in the editor use the vertex shader/hull/domain shader of the first pass declare. So it should not be the meta pass.
Pass

正在加载...
取消
保存