mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-01-03 16:13:30 +08:00
make hand no longer interfere with DOF autofocus. fix small lighting error for overworld translucents
This commit is contained in:
parent
a4f448987f
commit
d47eb2776f
@ -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 SkylightDir = ambientcoefs.y*1.5;
|
||||||
|
|
||||||
float skylight = max(pow(viewToWorld(flatnormal).y*0.5+0.5,0.1) + SkylightDir, 0.25);
|
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;
|
// 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);
|
// Indirect_lighting = DoAmbientLighting(averageSkyCol_Clouds, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy, skylight);
|
||||||
|
@ -39,8 +39,9 @@ const bool colortex5MipmapEnabled = true;
|
|||||||
|
|
||||||
|
|
||||||
uniform sampler2D noisetex; //noise
|
uniform sampler2D noisetex; //noise
|
||||||
uniform sampler2D depthtex1; //depth
|
|
||||||
uniform sampler2D depthtex0; //depth
|
uniform sampler2D depthtex0; //depth
|
||||||
|
uniform sampler2D depthtex1; //depth
|
||||||
|
uniform sampler2D depthtex2; //depth
|
||||||
|
|
||||||
uniform sampler2D colortex0; //clouds
|
uniform sampler2D colortex0; //clouds
|
||||||
uniform sampler2D colortex1; //albedo(rgb),material(alpha) RGBA16
|
uniform sampler2D colortex1; //albedo(rgb),material(alpha) RGBA16
|
||||||
@ -1017,7 +1018,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// gl_FragData[0].rgb = vec3(1);
|
// gl_FragData[0].rgb = vec3(1) ;
|
||||||
|
|
||||||
|
|
||||||
/* DRAWBUFFERS:3 */
|
/* DRAWBUFFERS:3 */
|
||||||
|
@ -25,6 +25,8 @@ flat varying float centerDepth;
|
|||||||
uniform sampler2D colortex4;
|
uniform sampler2D colortex4;
|
||||||
uniform sampler2D colortex6;
|
uniform sampler2D colortex6;
|
||||||
uniform sampler2D depthtex0;
|
uniform sampler2D depthtex0;
|
||||||
|
uniform sampler2D depthtex1;
|
||||||
|
uniform sampler2D depthtex2;
|
||||||
|
|
||||||
uniform mat4 gbufferModelViewInverse;
|
uniform mat4 gbufferModelViewInverse;
|
||||||
uniform vec3 sunPosition;
|
uniform vec3 sunPosition;
|
||||||
@ -177,7 +179,7 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
exposure = max(targetExposure*EXPOSURE_MULTIPLIER, 0);
|
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 = 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;
|
centerDepth = centerDepth * centerDepth * 65000.0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user