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