improve fog upsampler and filtered effects upsampler. improve metals in specular reflections. fix end and nether not compiling, and fix SSAO making them black. redo water shader. added water caustics strength misc setting. add 2 new post process types "xonk tonemapp" and "full reinhard". create overdraw prevention for DH shadowmap. fix SSS with dh shadowmap. tweak screenspace shadow SSS to be better in the distance. add fog behind glass. move water fog to be done in the fog behind glass pass.

This commit is contained in:
Xonk
2024-03-01 22:48:09 -05:00
parent d4a239f223
commit 1ea16b150a
102 changed files with 1982 additions and 753 deletions

View File

@ -188,11 +188,10 @@ void DoSpecularReflections(
Lightmap = clamp((Lightmap-0.6)*5.0, 0.0,1.0);
// Roughness = unpackRoughness(Roughness);
Roughness = 1.0 - Roughness; Roughness *= Roughness;
F0 = F0 == 0.0 ? 0.02 : F0;
// Roughness = 0.0;
// Roughness = 0.1;
// F0 = 0.9;
mat3 Basis = CoordBase(Normal);
@ -221,7 +220,8 @@ void DoSpecularReflections(
bool hasReflections = Roughness_Threshold == 1.0 ? true : F0 * (1.0 - Roughness * Roughness_Threshold) > 0.01;
// mulitply all reflections by the albedo if it is a metal.
vec3 Metals = F0 > 229.5/255.0 ? max(Albedo, Fresnel) : vec3(1.0);
vec3 Metals = F0 > 229.5/255.0 ? lerp(normalize(Albedo+1e-7) * (dot(Albedo,vec3(0.21, 0.72, 0.07)) * 0.7 + 0.3), vec3(1.0), Fresnel * pow(1.0-Roughness,25.0)) : vec3(1.0);
// vec3 Metals = F0 > 229.5/255.0 ? max(Albedo, Fresnel) : vec3(1.0);
// --------------- BACKGROUND REFLECTIONS
// apply background reflections to the final color. make sure it does not exist based on the lightmap