tweak indirect SSS to be a little bright like it used to be. Tweak sampling for shadow filtering, ssao, rtao, ssgi, and specular reflections.

This commit is contained in:
Xonk
2023-10-14 23:34:52 -04:00
parent 87d25d0637
commit d9d3cd0c2d
24 changed files with 238 additions and 271 deletions

View File

@ -10,7 +10,7 @@ flat varying vec3 sunColor;
flat varying vec3 moonColor;
// flat varying vec3 zenithColor;
flat varying vec3 WsunVec;
// flat varying vec3 WsunVec;
flat varying vec2 tempOffsets;
flat varying float exposure;
@ -46,6 +46,9 @@ vec4 lightCol = vec4(lightSourceColor, float(sunElevation > 1e-5)*2-1.);
#include "/lib/sky_gradient.glsl"
#include "/lib/Shadow_Params.glsl"
vec3 WsunVec = mat3(gbufferModelViewInverse)*sunVec;
// vec3 WsunVec = normalize(LightDir);
vec3 toShadowSpaceProjected(vec3 p3){
p3 = mat3(gbufferModelViewInverse) * p3 + gbufferModelViewInverse[3].xyz;
p3 = mat3(shadowModelView) * p3 + shadowModelView[3].xyz;
@ -133,7 +136,8 @@ if (gl_FragCoord.x > 18. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257){
vec2 planetSphere = vec2(0.0);
vec3 sky = vec3(0.0);
vec3 skyAbsorb = vec3(0.0);
vec3 WsunVec = mat3(gbufferModelViewInverse)*sunVec;
// vec3 WsunVec = mat3(gbufferModelViewInverse)*sunVec;
// vec3 WsunVec = normalize(LightDir);
sky = calculateAtmosphere(averageSkyCol*4000./2.0, viewVector, vec3(0.0,1.0,0.0), WsunVec, -WsunVec, planetSphere, skyAbsorb, 10, blueNoise());
@ -155,7 +159,8 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
vec2 p = clamp(floor(gl_FragCoord.xy-vec2(18.+257,1.))/256.+tempOffsets/256.,0.0,1.0);
vec3 viewVector = cartToSphere(p);
vec3 WsunVec = mat3(gbufferModelViewInverse)*sunVec;
// vec3 WsunVec = mat3(gbufferModelViewInverse)*sunVec;
// vec3 WsunVec = normalize(LightDir);
vec3 sky = texelFetch2D(colortex4,ivec2(gl_FragCoord.xy)-ivec2(257,0),0).rgb/150.0;
if(viewVector.y < -0.025) sky = sky * clamp( exp(viewVector.y) - 1.0,0.25,1.0) ;