diff options
| author | yum <yum.food.vr@gmail.com> | 2026-02-24 01:37:59 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-02-24 01:37:59 -0800 |
| commit | 155a8ceecfe64773eb21ba55a2ac286d52589141 (patch) | |
| tree | 4f883048f57d7f61d663eb41acf5187fd054779e /pbr.cginc | |
| parent | c1709ef4a57ab10e83afd9dfbed7e162e88c06d9 (diff) | |
Rewrite SH9 core, more concise
Diffstat (limited to 'pbr.cginc')
| -rwxr-xr-x | pbr.cginc | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -8,6 +8,12 @@ #include "texture_utils.cginc" #include "impostor.cginc" +// From filament: min roughness s.t. MIN_PERCEPTUAL_ROUGHNESS^4 > 0 in target +// precision. Although we use fp32, the higher min roughness gives us a broader +// specular highlight, which is preferable. +#define MIN_PERCEPTUAL_ROUGHNESS 0.045 +#define MIN_ROUGHNESS 0.002025 + struct Pbr { float4 albedo; float3 normal; @@ -33,12 +39,6 @@ struct Pbr { #endif }; -// From filament: min roughness s.t. MIN_PERCEPTUAL_ROUGHNESS^4 > 0 in target -// precision. We use fp32. The smallest non-subnormal is 2^(-126). The 4th -// root of that is ~3.29 * 10^-10. -#define MIN_PERCEPTUAL_ROUGHNESS (3.3E-10) -#define MIN_ROUGHNESS (1.09E-19) - #if defined(_PARALLAX_HEIGHTMAP) float2 parallax_offset(float2 uv, float3 view_dir_world, float3x3 tbn) { float3 view_dir_tangent = mul(tbn, view_dir_world); |
