diff --git a/shaders/dimensions/DH_solid.vsh b/shaders/dimensions/DH_solid.vsh index 38e1e37..bd19765 100644 --- a/shaders/dimensions/DH_solid.vsh +++ b/shaders/dimensions/DH_solid.vsh @@ -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 diff --git a/shaders/dimensions/DH_translucent.fsh b/shaders/dimensions/DH_translucent.fsh index 3b89972..1a52519 100644 --- a/shaders/dimensions/DH_translucent.fsh +++ b/shaders/dimensions/DH_translucent.fsh @@ -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;