41 lines
2.0 KiB
C#
41 lines
2.0 KiB
C#
using UnityEngine;
|
|
using UnityEngine.Rendering;
|
|
|
|
namespace BadDog.Rendering.AreaLight
|
|
{
|
|
/// <summary>
|
|
/// Shader property IDs for Area Lighting and Shadows
|
|
/// </summary>
|
|
public static class AreaLightingShaderIDs
|
|
{
|
|
// Light Data
|
|
public static readonly int _AreaLightDataBuffer = Shader.PropertyToID("_AreaLightDataBuffer");
|
|
public static readonly int _AreaLightDataBufferCount = Shader.PropertyToID("_AreaLightDataBufferCount");
|
|
|
|
// Shadow Data
|
|
public static readonly int _AreaLightsShadowmapTexture = Shader.PropertyToID("_AreaLightsShadowmapTexture");
|
|
public static readonly int _AreaLightsWorldToShadow = Shader.PropertyToID("_AreaLightsWorldToShadow");
|
|
public static readonly int _AreaLightShadowParams = Shader.PropertyToID("_AreaLightShadowParams");
|
|
public static readonly int _AreaLightShadowmapSize = Shader.PropertyToID("_AreaLightShadowmapSize");
|
|
public static readonly int _PCSSAdditionalLightParams = Shader.PropertyToID("_PCSSAdditionalLightParams");
|
|
|
|
// Shadow Rendering
|
|
public static readonly int _ShadowBias = Shader.PropertyToID("_ShadowBias");
|
|
public static readonly int _LightPosition = Shader.PropertyToID("_LightPosition");
|
|
|
|
// Shader keywords
|
|
public const string ENABLE_BG_AREA_LIGHTING_KEYWORD = "_ENABLE_BG_AREA_LIGHTING";
|
|
}
|
|
|
|
/// <summary>
|
|
/// BG Area Light shader global keywords (similar to URP's ShaderGlobalKeywords)
|
|
/// </summary>
|
|
internal static class ShaderGlobalKeywords
|
|
{
|
|
public static readonly GlobalKeyword BGAreaLightShadowsPCF2x2 = GlobalKeyword.Create("_BG_AREALIGHT_SHADOWS_PCF2X2");
|
|
public static readonly GlobalKeyword BGAreaLightShadowsTent5x5 = GlobalKeyword.Create("_BG_AREALIGHT_SHADOWS_TENT5X5");
|
|
public static readonly GlobalKeyword BGAreaLightShadowsTent7x7 = GlobalKeyword.Create("_BG_AREALIGHT_SHADOWS_TENT7X7");
|
|
public static readonly GlobalKeyword BGAreaLightShadowsPCSS = GlobalKeyword.Create("_BG_AREALIGHT_SHADOWS_PCSS");
|
|
}
|
|
}
|