浏览代码

minor cleanup

/main
vlad-andreev 8 年前
当前提交
b75103b5
共有 1 个文件被更改,包括 16 次插入15 次删除
  1. 31
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.cs

31
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.cs


}
}
private static AdditionalLightData DefaultAdditionalLightData
{
get
{
if (s_DefaultAdditionalLightDataGameObject == null)
{
s_DefaultAdditionalLightDataGameObject = new GameObject("Default Light Data");
s_DefaultAdditionalLightDataGameObject.hideFlags = HideFlags.HideAndDontSave;
s_DefaultAdditionalLightData = s_DefaultAdditionalLightDataGameObject.AddComponent<AdditionalLightData>();
}
return s_DefaultAdditionalLightData;
}
}
Material m_DeferredDirectMaterial = null;
Material m_DeferredIndirectMaterial = null;
Material m_DeferredAllMaterial = null;

UnityEditor.SceneView.onSceneGUIDelegate -= OnSceneGUI;
UnityEditor.SceneView.onSceneGUIDelegate += OnSceneGUI;
#endif
s_DefaultAdditionalLightDataGameObject = new GameObject("Default Light Data");
s_DefaultAdditionalLightDataGameObject.hideFlags = HideFlags.HideAndDontSave;
s_DefaultAdditionalLightData = s_DefaultAdditionalLightDataGameObject.AddComponent<AdditionalLightData>();
}
public override void Cleanup()

{
var directionalLightData = new DirectionalLightData();
if (additionalData == null)
additionalData = s_DefaultAdditionalLightData;
// Light direction for directional is opposite to the forward direction
directionalLightData.forward = light.light.transform.forward;
directionalLightData.up = light.light.transform.up;

public void GetLightData(ShadowSettings shadowSettings, GPULightType gpuLightType, VisibleLight light, AdditionalLightData additionalData, int lightIndex, ref ShadowOutput shadowOutput, ref int shadowCount)
{
var lightData = new LightData();
if (additionalData == null)
additionalData = s_DefaultAdditionalLightData;
lightData.lightType = gpuLightType;

if (additionalData == null)
{
Debug.LogWarningFormat("Light entity {0} has no additional data, will be rendered using default values.", light.light.name);
additionalData = s_DefaultAdditionalLightData;
additionalData = DefaultAdditionalLightData;
}
LightCategory lightCategory = LightCategory.Count;

int lightIndex = (int)(sortKey & 0xFFFF);
var light = cullResults.visibleLights[lightIndex];
var additionalData = light.light.GetComponent<AdditionalLightData>();
if (additionalData == null)
additionalData = s_DefaultAdditionalLightData;
var additionalData = light.light.GetComponent<AdditionalLightData>() ?? DefaultAdditionalLightData;
// Directional rendering side, it is separated as it is always visible so no volume to handle here
if (gpuLightType == GPULightType.Directional)

正在加载...
取消
保存