浏览代码

Merge branch 'master' into volume-texture-tool

/main
sebastienlagarde 6 年前
当前提交
f7078aa6
共有 4 个文件被更改,包括 7 次插入7 次删除
  1. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/GlobalIlluminationUtils.cs
  3. 4
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Light/HDAdditionalLightData.cs
  4. 4
      com.unity.render-pipelines.lightweight/LWRP/Editor/LightweightLightEditor.cs

4
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs


case LightShape.Rectangle:
// TODO: Currently if we use Area type as it is offline light in legacy, the light will not exist at runtime
//m_BaseData.type.enumValueIndex = (int)LightType.Area;
//m_BaseData.type.enumValueIndex = (int)LightType.Rectangle;
// In case of change, think to update InitDefaultHDAdditionalLightData()
settings.lightType.enumValueIndex = (int)LightType.Point;
m_AdditionalLightData.lightTypeExtent.enumValueIndex = (int)LightTypeExtent.Rectangle;

case LightShape.Line:
// TODO: Currently if we use Area type as it is offline light in legacy, the light will not exist at runtime
//m_BaseData.type.enumValueIndex = (int)LightType.Area;
//m_BaseData.type.enumValueIndex = (int)LightType.Rectangle;
settings.lightType.enumValueIndex = (int)LightType.Point;
m_AdditionalLightData.lightTypeExtent.enumValueIndex = (int)LightTypeExtent.Line;
EditorGUI.BeginChangeCheck();

2
com.unity.render-pipelines.high-definition/HDRP/Lighting/GlobalIlluminationUtils.cs


break;
// Note: We don't support this type in HDRP, but ini just in case
case LightType.Area:
case LightType.Rectangle:
ld.orientation = l.transform.rotation;
ld.position = l.transform.position;
ld.range = l.range;

4
com.unity.render-pipelines.high-definition/HDRP/Lighting/Light/HDAdditionalLightData.cs


lightData.lightUnit = LightUnit.Lux;
lightData.intensity = k_DefaultDirectionalLightIntensity;
break;
case LightType.Area: // Rectangle by default when light is created
case LightType.Rectangle: // Rectangle by default when light is created
lightData.lightUnit = LightUnit.Lumen;
lightData.intensity = k_DefaultAreaLightIntensity;
break;

}
// Sanity check: lightData.lightTypeExtent is init to LightTypeExtent.Punctual (in case for unknow reasons we recreate additional data on an existing line)
if (light.type == LightType.Area && lightData.lightTypeExtent == LightTypeExtent.Punctual)
if (light.type == LightType.Rectangle && lightData.lightTypeExtent == LightTypeExtent.Punctual)
{
lightData.lightTypeExtent = LightTypeExtent.Rectangle;
light.type = LightType.Point; // Same as in HDLightEditor

4
com.unity.render-pipelines.lightweight/LWRP/Editor/LightweightLightEditor.cs


public bool spotOptionsValue { get { return typeIsSame && lightProperty.type == LightType.Spot; } }
public bool pointOptionsValue { get { return typeIsSame && lightProperty.type == LightType.Point; } }
public bool dirOptionsValue { get { return typeIsSame && lightProperty.type == LightType.Directional; } }
public bool areaOptionsValue { get { return typeIsSame && lightProperty.type == LightType.Area; } }
public bool areaOptionsValue { get { return typeIsSame && lightProperty.type == LightType.Rectangle; } }
public bool runtimeOptionsValue { get { return typeIsSame && (lightProperty.type != LightType.Area && lightProperty.type != LightType.Point && !settings.isCompletelyBaked); } }
public bool runtimeOptionsValue { get { return typeIsSame && (lightProperty.type != LightType.Rectangle && lightProperty.type != LightType.Point && !settings.isCompletelyBaked); } }
public bool bakedShadowRadius { get { return typeIsSame && (lightProperty.type == LightType.Point || lightProperty.type == LightType.Spot) && settings.isBakedOrMixed; } }
public bool bakedShadowAngle { get { return typeIsSame && lightProperty.type == LightType.Directional && settings.isBakedOrMixed; } }
public bool shadowOptionsValue { get { return shadowTypeIsSame && lightProperty.shadows != LightShadows.None; } }

正在加载...
取消
保存