initial implementation of world curvature

This commit is contained in:
Valerie Wolfe 2024-04-14 17:37:44 -04:00
parent 4ed76c2ea2
commit 3e9cb72a58
8 changed files with 23 additions and 5 deletions

View file

@ -2,6 +2,8 @@
#define pixelSize 2 // [1 2 4 8 16] #define pixelSize 2 // [1 2 4 8 16]
#define worldCurvature 0 // [0 1 2]
varying vec2 texcoord; varying vec2 texcoord;
varying vec4 color; varying vec4 color;
varying vec2 lmcoord; varying vec2 lmcoord;
@ -26,5 +28,9 @@ void main() {
#ifdef tWarp #ifdef tWarp
texture_warp(); texture_warp();
#endif #endif
#ifdef WORLD
#include "/module/world.vert"
#endif
} }

View file

@ -0,0 +1 @@
#include "/gbuffers_basic.fsh"

View file

@ -0,0 +1,2 @@
#define WORLD
#include "/gbuffers_basic.vsh"

View file

@ -0,0 +1 @@
#include "/gbuffers_basic.fsh"

View file

@ -0,0 +1,2 @@
#define WORLD
#include "/gbuffers_basic.vsh"

View file

@ -44,8 +44,6 @@ value.dofRes.0=Static
value.dofRes.1=Dynamic value.dofRes.1=Dynamic
option.worldCurvature=World Curvature option.worldCurvature=World Curvature
value.worldCurvature.0=Off value.worldCurvature.0=Off
value.worldCurvature.1=Chunk value.worldCurvature.1=Cylinder
value.worldCurvature.2=Cylinder value.worldCurvature.2=Round
value.worldCurvature.3=Polyhedron
value.worldCurvature.4=Sphere

View file

@ -0,0 +1,8 @@
#if worldCurvature == 1
float z = gl_Position.z * gl_Position.z;
gl_Position.y -= z / 256;
#elif worldCurvature == 2
vec2 xz = gl_Position.xz;
gl_Position.y -= ceil(( dot(xz, xz) * 5 ) / 512) / 5;
#endif

View file

@ -19,7 +19,7 @@ screen.COLOR=colorMode dithering <empty> rgbSteps <empty> <empty> hueSteps satSt
screen.PSX=vWarp tWarp screen.PSX=vWarp tWarp
# fx # fx
screen.FX=dof dofRes screen.FX=dof dofRes worldCurvature
# -- CONDITIONALS -- # -- CONDITIONALS --
gbuffers_hand.enabled=tWarp gbuffers_hand.enabled=tWarp