From 25f8c5f64ccec6c4bbe78c19c3ed743fce0944c5 Mon Sep 17 00:00:00 2001 From: Onek8 Date: Thu, 22 May 2025 02:24:58 +0000 Subject: [PATCH] Update leenkx/Shaders/voxel_resolve_ao/voxel_resolve_ao.comp.glsl --- leenkx/Shaders/voxel_resolve_ao/voxel_resolve_ao.comp.glsl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/leenkx/Shaders/voxel_resolve_ao/voxel_resolve_ao.comp.glsl b/leenkx/Shaders/voxel_resolve_ao/voxel_resolve_ao.comp.glsl index d1425e9..7123f27 100644 --- a/leenkx/Shaders/voxel_resolve_ao/voxel_resolve_ao.comp.glsl +++ b/leenkx/Shaders/voxel_resolve_ao/voxel_resolve_ao.comp.glsl @@ -106,6 +106,7 @@ void main() { #ifdef _Brdf vec2 envBRDF = texelFetch(senvmapBrdf, ivec2(vec2(dotNV, 1.0 - roughness) * 256.0), 0).xy; + vec3 F = f0 * envBRDF.x + envBRDF.y; #endif // Envmap @@ -153,14 +154,14 @@ void main() { envl.rgb *= albedo; #ifdef _Brdf - envl.rgb *= 1.0 - (f0 * envBRDF.x + envBRDF.y); //LV: We should take refracted light into account + envl.rgb *= 1.0 - F; //LV: We should take refracted light into account #endif #ifdef _Rad // Indirect specular - envl.rgb += prefilteredColor * (f0 * envBRDF.x + envBRDF.y); //LV: Removed "1.5 * occspec.y". Specular should be weighted only by FV LUT + envl.rgb += prefilteredColor * F; //LV: Removed "1.5 * occspec.y". Specular should be weighted only by FV LUT #else #ifdef _EnvCol - envl.rgb += backgroundCol * (f0 * envBRDF.x + envBRDF.y); //LV: Eh, what's the point of weighting it only by F0? + envl.rgb += backgroundCol * F; //LV: Eh, what's the point of weighting it only by F0? #endif #endif