make hand no longer interfere with DOF autofocus. fix small lighting error for overworld translucents

This commit is contained in:
Xonk 2023-10-23 17:41:30 -04:00
parent a4f448987f
commit d47eb2776f
3 changed files with 7 additions and 3 deletions

View File

@ -445,6 +445,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
float SkylightDir = ambientcoefs.y*1.5;
float skylight = max(pow(viewToWorld(flatnormal).y*0.5+0.5,0.1) + SkylightDir, 0.25);
AmbientLightColor *= skylight;
// float skylight = max(pow(viewToWorld(flatnormal).y*0.5+0.5,0.1) + viewToWorld(normal).y, 0.25) * 1.35;
// Indirect_lighting = DoAmbientLighting(averageSkyCol_Clouds, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy, skylight);

View File

@ -39,8 +39,9 @@ const bool colortex5MipmapEnabled = true;
uniform sampler2D noisetex; //noise
uniform sampler2D depthtex1; //depth
uniform sampler2D depthtex0; //depth
uniform sampler2D depthtex1; //depth
uniform sampler2D depthtex2; //depth
uniform sampler2D colortex0; //clouds
uniform sampler2D colortex1; //albedo(rgb),material(alpha) RGBA16
@ -1017,7 +1018,7 @@ void main() {
}
#endif
// gl_FragData[0].rgb = vec3(1);
// gl_FragData[0].rgb = vec3(1) ;
/* DRAWBUFFERS:3 */

View File

@ -25,6 +25,8 @@ flat varying float centerDepth;
uniform sampler2D colortex4;
uniform sampler2D colortex6;
uniform sampler2D depthtex0;
uniform sampler2D depthtex1;
uniform sampler2D depthtex2;
uniform mat4 gbufferModelViewInverse;
uniform vec3 sunPosition;
@ -177,7 +179,7 @@ void main() {
exposure = max(targetExposure*EXPOSURE_MULTIPLIER, 0);
float currCenterDepth = ld(texture2D(depthtex0, vec2(0.5)).r);
float currCenterDepth = ld(texture2D(depthtex2, vec2(0.5)).r);
centerDepth = mix(sqrt(texelFetch2D(colortex4,ivec2(14,37),0).g/65000.0), currCenterDepth, clamp(DoF_Adaptation_Speed*exp(-0.016/frameTime+1.0)/(6.0+currCenterDepth*far),0.0,1.0));
centerDepth = centerDepth * centerDepth * 65000.0;