forked from LeenkxTeam/LNXSDK
Update leenkx/Shaders/voxel_resolve_ao/voxel_resolve_ao.comp.glsl
This commit is contained in:
@ -106,6 +106,7 @@ void main() {
|
|||||||
|
|
||||||
#ifdef _Brdf
|
#ifdef _Brdf
|
||||||
vec2 envBRDF = texelFetch(senvmapBrdf, ivec2(vec2(dotNV, 1.0 - roughness) * 256.0), 0).xy;
|
vec2 envBRDF = texelFetch(senvmapBrdf, ivec2(vec2(dotNV, 1.0 - roughness) * 256.0), 0).xy;
|
||||||
|
vec3 F = f0 * envBRDF.x + envBRDF.y;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Envmap
|
// Envmap
|
||||||
@ -153,14 +154,14 @@ void main() {
|
|||||||
envl.rgb *= albedo;
|
envl.rgb *= albedo;
|
||||||
|
|
||||||
#ifdef _Brdf
|
#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
|
#endif
|
||||||
|
|
||||||
#ifdef _Rad // Indirect specular
|
#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
|
#else
|
||||||
#ifdef _EnvCol
|
#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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user