ADDED material AO. made Volumetric fogs all converge better. made "ambient light only" work universally. removed fallback dimension.

This commit is contained in:
Xonk
2023-10-20 20:26:41 -04:00
parent ca39a0a6dd
commit fd0e4c45be
76 changed files with 80 additions and 581 deletions

View File

@ -442,8 +442,13 @@ void main() {
//////////////////////////////// ////////////////////////////////
#if defined WORLD && defined MC_NORMAL_MAP
vec3 NormalTex = texture2D_POMSwitch(normals, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM).xyw;
float Heightmap = 1.0 - NormalTex.z;
vec4 NormalTex = texture2D_POMSwitch(normals, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM).xyzw;
#ifdef MATERIAL_AO
Albedo.rgb *= NormalTex.b*0.5+0.5;
#endif
float Heightmap = 1.0 - NormalTex.w;
NormalTex.xy = NormalTex.xy * 2.0-1.0;
NormalTex.z = sqrt(max(1.0 - dot(NormalTex.xy, NormalTex.xy), 0.0));
@ -455,6 +460,7 @@ void main() {
gl_FragDepth = toClipSpace3(truePos).z;
#endif
if(PHYSICSMOD_SNOW < 1) normal = applyBump(tbnMatrix, NormalTex.xyz, mix(1.0,1-Puddle_shape,rainfall) );
#endif