diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-11 17:35:46 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-11 17:35:46 -0700 |
| commit | c36b919595874355c511b2c75ba9797440be09a5 (patch) | |
| tree | 1328f04615d58591883c2c7d9de60614975846be /filamented.cginc | |
| parent | c8cfc043c105a32e1efab341536311277bfc90eb (diff) | |
Update specular occlusion; always runs now
Diffstat (limited to 'filamented.cginc')
| -rw-r--r-- | filamented.cginc | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
