initial implementation of world curvature

This commit is contained in:
Valerie Wolfe 2024-04-14 17:37:44 -04:00
parent a30d89c8a6
commit 7fcfce3746
8 changed files with 23 additions and 5 deletions

View file

@ -2,6 +2,8 @@
#define pixelSize 2 // [1 2 4 8 16]
#define worldCurvature 0 // [0 1 2]
varying vec2 texcoord;
varying vec4 color;
varying vec2 lmcoord;
@ -26,5 +28,9 @@ void main() {
#ifdef tWarp
texture_warp();
#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
option.worldCurvature=World Curvature
value.worldCurvature.0=Off
value.worldCurvature.1=Chunk
value.worldCurvature.2=Cylinder
value.worldCurvature.3=Polyhedron
value.worldCurvature.4=Sphere
value.worldCurvature.1=Cylinder
value.worldCurvature.2=Round

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
# fx
screen.FX=dof dofRes
screen.FX=dof dofRes worldCurvature
# -- CONDITIONALS --
gbuffers_hand.enabled=tWarp