FIX TAA when distant horizons is on. ADD DH submenus

This commit is contained in:
Xonk
2024-02-10 18:10:46 -05:00
parent f2a04b61e5
commit 7d65d65179
19 changed files with 680 additions and 190 deletions

View File

@ -60,11 +60,28 @@ vec3 toScreenSpace(vec3 p) {
return viewPos.xyz / viewPos.w;
}
uniform sampler2D noisetex;
uniform int frameCounter;
uniform float frameTimeCounter;
float blueNoise(){
return fract(texelFetch2D(noisetex, ivec2(gl_FragCoord.xy)%512, 0).a + 1.0/1.6180339887 * frameCounter);
}
float interleaved_gradientNoise(){
return fract(52.9829189*fract(0.06711056*gl_FragCoord.x + 0.00583715*gl_FragCoord.y)+frameTimeCounter*51.9521);
}
float R2_dither(){
vec2 coord = gl_FragCoord.xy + (frameCounter%40000) * 2.0;
vec2 alpha = vec2(0.75487765, 0.56984026);
return fract(alpha.x * coord.x + alpha.y * coord.y ) ;
}
/* RENDERTARGETS:1,7,8 */
void main() {
// overdraw prevention
if(clamp(1.0-length(pos.xyz)/max(far-16,0.0),0,1) > 0 ) discard;
if(clamp(1.0-length(pos.xyz)/max(far - 16.0,0.0),0.0,1.0) > 0.0 ){
discard;
return;
}
vec3 normals = viewToWorld(normals_and_materials.xyz);
float materials = normals_and_materials.a;