initial implementation of world curvature
This commit is contained in:
parent
a30d89c8a6
commit
7fcfce3746
8 changed files with 23 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
1
shaders/gbuffers_entities.fsh
Normal file
1
shaders/gbuffers_entities.fsh
Normal file
|
@ -0,0 +1 @@
|
|||
#include "/gbuffers_basic.fsh"
|
2
shaders/gbuffers_entities.vsh
Normal file
2
shaders/gbuffers_entities.vsh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#define WORLD
|
||||
#include "/gbuffers_basic.vsh"
|
1
shaders/gbuffers_terrain.fsh
Normal file
1
shaders/gbuffers_terrain.fsh
Normal file
|
@ -0,0 +1 @@
|
|||
#include "/gbuffers_basic.fsh"
|
2
shaders/gbuffers_terrain.vsh
Normal file
2
shaders/gbuffers_terrain.vsh
Normal file
|
@ -0,0 +1,2 @@
|
|||
#define WORLD
|
||||
#include "/gbuffers_basic.vsh"
|
|
@ -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
|
||||
|
||||
|
|
8
shaders/module/world.vert
Normal file
8
shaders/module/world.vert
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue