Compare commits
3 commits
038ff7f142
...
eab55046b8
Author | SHA1 | Date | |
---|---|---|---|
eab55046b8 | |||
13a07850ac | |||
8da7185ead |
5 changed files with 25 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
#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
|
||||
|
||||
#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 -= 2 * z / worldRadius;
|
||||
#elif worldCurvature == 2
|
||||
vec2 xz = gl_Position.xz;
|
||||
gl_Position.y -= round(( dot(xz, xz) / worldRadius ) * 8) / 8;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue