/*
====================================================================================================

    Copyright (C) 2025 Pyvtron VX Shaders - Pyvton

    All Rights Reserved unless otherwise explicitly stated.

    Before You Do Something With Pyvtron VX Shaders, You MUST Read This:

    You Must Read The License: https://pyvton.pages.dev/minecraft-shaders/pyvtron-shaders-license
    And Read The Agreement: https://pyvton.pages.dev/minecraft-shaders/pyvtron-shaders-agreement

====================================================================================================
*/

//#define SPHERICAL_WORLD
#define RADIUS 200 // [50 75 100 150 200 300 500 1000 1500 2000]

#ifdef SPHERICAL_WORLD
vec4 _O0=gbufferModelViewInverse*(gl_ModelViewMatrix*gl_Vertex);float _xZ=dot(_O0.xz,_O0.xz+vec2(.0));float _r2=RADIUS*RADIUS;float _tmp=clamp(_r2-_xZ,.0,_r2*2.);_O0.y+=(sqrt(_tmp+1e-8)+(.0*_O0.y))-RADIUS;gl_Position=(gl_ProjectionMatrix*gbufferModelView)*(_O0+vec4(.0));
#endif

