[unity] Added Fog material toggle to "Universal Render Pipeline/Spine/Skeleton Lit" shader defaulting to disabled. See #2959.

This commit is contained in:
Harald Csaszar 2025-10-23 11:49:58 +02:00
parent 61c0a67893
commit 46bf57b5ff
2 changed files with 4 additions and 2 deletions

View File

@ -16,8 +16,8 @@
#define USE_ADAPTIVE_PROBE_VOLUMES
#endif
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
#define _FOG
#if !(defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2))
#undef _FOG
#endif
struct appdata {

View File

@ -11,6 +11,7 @@ Shader "Universal Render Pipeline/Spine/Skeleton Lit" {
_Color(" Light Color", Color) = (1,1,1,1)
_Black(" Dark Color", Color) = (0,0,0,0)
[MaterialToggle(_ADAPTIVE_PROBE_VOLUMES_PER_PIXEL)] _AdaptiveProbeVolumesPerPixel("APV per Pixel", Float) = 1
[MaterialToggle(_FOG)] _Fog("Fog", Float) = 0
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Compare", Float) = 8 // Set to Always as default
}
@ -53,6 +54,7 @@ Shader "Universal Render Pipeline/Spine/Skeleton Lit" {
#pragma multi_compile _ _LIGHT_AFFECTS_ADDITIVE
#pragma multi_compile_fragment _ _LIGHT_COOKIES
#pragma shader_feature _TINT_BLACK_ON
#pragma shader_feature _ _FOG
// Farward+ renderer keywords
#pragma multi_compile_fragment _ _LIGHT_LAYERS
#pragma multi_compile _ _FORWARD_PLUS