mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-11 01:38:20 +08:00
Small fix for rain ambient light and vanilla SSR
This commit is contained in:
1 parent
7e16e77e38
commit
bd8d2c95bd
2 files changed
+7
-1
No files matched your search
@@ -340,6 +340,8 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
|
||||
|
||||
float cloudPlaneDistance = 0.0;
|
||||
vec2 cloudDistance = vec2(0.0);
|
||||
|
||||
skyGroundCol *= (1.0 - (1.0 - RAIN_AMBIENT_LIGHT_MODIFIER) * rainStrength);
|
||||
|
||||
vec4 volumetricClouds = GetVolumetricClouds(viewPos, vec2(noise, 1.0-noise), WsunVec, WmoonVec, sunColor*2.5, moonColor*2.5, skyGroundCol/30.0, cloudPlaneDistance, cloudDistance);
|
||||
|
||||
|
||||
@@ -134,7 +134,9 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo
|
||||
for (int i = 0; i <= int(quality); i++) {
|
||||
|
||||
float sampleDepth = texelFetch2D(colortex4,ivec2(spos.xy/texelSize/4.0),0).a/65000.0;
|
||||
#if defined DISTANT_HORIZONS && defined DH_SCREENSPACE_REFLECTIONS
|
||||
if (sampleDepth < 1.0) {
|
||||
#endif
|
||||
sp = invLinZ(sqrt(sampleDepth));
|
||||
|
||||
if(sp < max(minZ, maxZ) && sp > min(minZ, maxZ)) return vec3(spos.xy/RENDER_SCALE,sp);
|
||||
@@ -145,9 +147,11 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo
|
||||
spos += stepv;
|
||||
|
||||
reflectionLength += 1.0 / quality;
|
||||
#if defined DISTANT_HORIZONS && defined DH_SCREENSPACE_REFLECTIONS
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return vec3(1.1);
|
||||
}
|
||||
@@ -232,7 +236,7 @@ vec4 screenSpaceReflections(
|
||||
|
||||
#if defined DISTANT_HORIZONS && defined DH_SCREENSPACE_REFLECTIONS
|
||||
if (raytracePos.z >= 1.0) {
|
||||
vec3 raytracePos_DH = rayTraceSpeculars_DH(reflectedVector, viewPos, noise, SSR_STEPS_DH, isHand, reflectionLength, fresnel);
|
||||
vec3 raytracePos_DH = rayTraceSpeculars_DH(reflectedVector, viewPos, noise, quality, isHand, reflectionLength, fresnel);
|
||||
raytracePos = raytracePos_DH;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user