From c36b919595874355c511b2c75ba9797440be09a5 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 11 Mar 2026 17:35:46 -0700 Subject: Update specular occlusion; always runs now --- filamented.cginc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'filamented.cginc') diff --git a/filamented.cginc b/filamented.cginc index 6d34123..63552c2 100644 --- a/filamented.cginc +++ b/filamented.cginc @@ -301,7 +301,7 @@ inline half3 UnityGI_prefilteredRadiance(const UnityGIInput data, const float pe return specular; } -#if defined(_AMBIENT_OCCLUSION) || defined(_BENT_NORMALS) +#if defined(_BENT_NORMALS) // Oat and Sander 2007, "Ambient Aperture Lighting" // Jimenez et al. 2016, "Practical Realtime Strategies for Accurate Indirect Occlusion" float sphericalCapsIntersection(float cosCap1, float cosCap2, float cosDistance) { @@ -321,6 +321,7 @@ float sphericalCapsIntersection(float cosCap1, float cosCap2, float cosDistance) float area = -2.0 * x2 * x + 3.0 * x2; return area * (1.0 - max(cosCap1, cosCap2)); } +#endif // _BENT_NORMALS float computeSpecularAO(float NoV, float visibility, float roughness, float3 bent_normal, float3 reflect_dir) { #if defined(_BENT_NORMALS) @@ -334,6 +335,5 @@ float computeSpecularAO(float NoV, float visibility, float roughness, float3 ben return saturate(pow(NoV + visibility, exp2(-16.0 * roughness - 1.0)) - 1.0 + visibility); #endif } -#endif // _AMBIENT_OCCLUSION || _BENT_NORMALS #endif // __FILAMENTED_INC -- cgit v1.2.3