fix world curvature on DH LODS

This commit is contained in:
Xonk 2024-11-15 19:53:12 -05:00 committed by MikiP98
parent e7401e9d95
commit ebbd25cd27
2 changed files with 19 additions and 2 deletions

View File

@ -63,7 +63,23 @@ void main() {
vec4 viewPos = gl_ModelViewMatrix * vPos;
localPos = gbufferModelViewInverse * viewPos;
gl_Position = dhProjection * viewPos;
#ifdef PLANET_CURVATURE
vec4 worldPos = localPos;
float curvature = length(worldPos) / (16*8);
worldPos.y -= curvature*curvature * CURVATURE_AMOUNT;
worldPos = gbufferModelView * worldPos;
gl_Position = dhProjection * worldPos;
#else
gl_Position = dhProjection * viewPos;
#endif
#ifdef TAA_UPSCALING

View File

@ -5,8 +5,9 @@
#include "/lib/projections.glsl"
#ifdef OVERWORLD_SHADER
#define WATER_SUN_SPECULAR
#define WATER_SUN_SPECULAR
#endif
uniform vec2 texelSize;
// uniform int moonPhase;
uniform float frameTimeCounter;