Compare commits

..

3 commits

5 changed files with 25 additions and 13 deletions

View file

@ -2,8 +2,6 @@
#include "/module/common.glsl"
#define worldCurvature 0 // [0 1 2]
varying vec2 texcoord;
varying vec4 color;
varying vec2 lmcoord;
@ -13,6 +11,7 @@ uniform float viewWidth, viewHeight;
#include "/module/vertex_warp.vert"
#include "/module/texture_warp.vert"
#include "/module/world.vert"
void main() {
texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
@ -30,7 +29,9 @@ void main() {
#endif
#ifndef NON_WORLD
#include "/module/world.vert"
#if worldCurvature > 0
world_curvature();
#endif
#endif
}

View file

@ -56,4 +56,9 @@ option.worldCurvature=World Curvature
value.worldCurvature.0=Off
value.worldCurvature.1=Cylinder
value.worldCurvature.2=Round
option.worldRadius=Curvature Strength
value.worldRadius.1024=Low (1024)
value.worldRadius.512=Medium (512)
value.worldRadius.256=High (256)
value.worldRadius.-256=Inverse (-256)

View file

@ -1,5 +1,5 @@
vec2 caOffset = vec2(pixelSize / viewWidth, 0);
vec2 caOffset = vec2(2 * pixelSize / viewWidth, 0);
vec3 aberrate() {
vec2 offset = caOffset * abs(cos(texcoord * 3.14));

View file

@ -1,8 +1,14 @@
#define worldCurvature 0 // [0 1 2]
#define worldRadius 512 // [1024 512 256 -256]
void world_curvature() {
#if worldCurvature == 1
float z = gl_Position.z * gl_Position.z;
gl_Position.y -= z / 256;
gl_Position.y -= 2 * z / worldRadius;
#elif worldCurvature == 2
vec2 xz = gl_Position.xz;
gl_Position.y -= ceil(( dot(xz, xz) * 5 ) / 512) / 5;
gl_Position.y -= round(( dot(xz, xz) / worldRadius ) * 8) / 8;
#endif
}

View file

@ -1,4 +1,4 @@
sliders=pixelSize hueSteps satSteps valSteps rgbSteps vWarp
sliders=pixelSize hueSteps satSteps valSteps rgbSteps vWarp worldRadius
# -- PROFILES --
profile.DEFAULT=pixelSize=2 colorMode=0 dithering hueSteps=4 satSteps=4 valSteps=4 vWarp=0 !tWarp !hBlur
@ -26,7 +26,7 @@ screen.PSX=vWarp tWarp # playstation
screen.REALITY=hBlur # nintendo 64
# custom effects
screen.FX=dof dofRes worldCurvature
screen.FX=dof dofRes worldCurvature worldRadius
# -- CONDITIONALS --
gbuffers_hand.enabled=tWarp