improve gtao/rtao/ssgi in all dimensions/lighting situations. improve RP sky support,.

This commit is contained in:
Xonk
2024-06-25 20:34:45 -04:00
parent 38c514c2b3
commit 7607c0ff41
14 changed files with 432 additions and 231 deletions

View File

@ -5,12 +5,14 @@ const float k = 1.8;
const float d0 = 0.04 + max(64.0 - shadowDistance, 0.0)/64.0 * 0.26;
const float d1 = 0.61;
float a = exp(d0);
float b = (exp(d1)-a)*150./128.0;
// thank you Espen
#ifdef DISTANT_HORIZONS_SHADOWMAP
float b = (exp(d1)-a)*min(dhRenderDistance, shadowDistance)/shadowDistance;
#else
float b = (exp(d1)-a)*min(far+16.0*3.5, shadowDistance)/shadowDistance;
#endif
// #ifdef DISTANT_HORIZONS_SHADOWMAP
// float b = (exp(d1)-a)*min(dhRenderDistance, shadowDistance)/shadowDistance;
// #else
// float b = (exp(d1)-a)*min(far+16.0*3.5, shadowDistance)/shadowDistance;
// #endif
vec4 BiasShadowProjection(in vec4 projectedShadowSpacePosition) {