您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

33 行
1010 B

using System;
namespace UnityEngine.ScriptableRenderLoop
{
//@TODO: We should continously move these values
// into the engine when we can see them being generally useful
[RequireComponent(typeof(Light))]
public class AdditionalLightData : MonoBehaviour
{
public const int defaultShadowResolution = 512;
public int shadowResolution = defaultShadowResolution;
[RangeAttribute(0.0F, 100.0F)]
public float innerSpotPercent = 0.0F;
public static float GetInnerSpotPercent01(AdditionalLightData lightData)
{
if (lightData != null)
return Mathf.Clamp(lightData.innerSpotPercent, 0.0f, 100.0f) / 100.0f;
else
return 0.0F;
}
public static int GetShadowResolution(AdditionalLightData lightData)
{
if (lightData != null)
return lightData.shadowResolution;
else
return defaultShadowResolution;
}
}
}