Compare commits
2 commits
fcd88cd03b
...
933cb21020
Author | SHA1 | Date | |
---|---|---|---|
933cb21020 | |||
7668d7a744 |
6 changed files with 66 additions and 17 deletions
|
@ -125,20 +125,20 @@ void main() {
|
|||
#endif
|
||||
vec3 color = texture2D(gcolor, newcoord).rgb;
|
||||
|
||||
#if colorMode == 0
|
||||
#if colorMode == MODE_HSV
|
||||
color = rgb2hsv(color).xyz;
|
||||
#endif
|
||||
|
||||
vec3 final;
|
||||
#ifdef dithering
|
||||
#if colorMode == 0
|
||||
#if colorMode == MODE_HSV
|
||||
vec3 filtered = vec3(dither(color.x, hueMax), dither(color.y, satMax), dither(color.z, valMax)).rgb;
|
||||
final = hsv2rgb(filtered);
|
||||
#else
|
||||
final = vec3(dither(color.r, colormax.x), dither(color.g, colormax.y), dither(color.b, colormax.z));
|
||||
#endif
|
||||
#else
|
||||
#if colorMode == 0
|
||||
#if colorMode == MODE_HSV
|
||||
vec3 filtered = vec3(lightnessStep(color.x, hueMax), lightnessStep(color.y, satMax), lightnessStep(color.z, valMax)).rgb;
|
||||
final = hsv2rgb(filtered);
|
||||
#else
|
||||
|
@ -146,9 +146,11 @@ void main() {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if colorMode == 1 && colorDepth == 1
|
||||
#if colorMode == MODE_RGB && colorDepth == 1
|
||||
if(final.r == 1)
|
||||
final = monoColor;
|
||||
final = monoHigh;
|
||||
else
|
||||
final = monoLow;
|
||||
#endif
|
||||
|
||||
#ifdef interlacing
|
||||
|
|
|
@ -9,6 +9,7 @@ profile.REALITY=Project Reality
|
|||
profile.SNES=Super Famicom
|
||||
profile.VR32=VR32
|
||||
|
||||
|
||||
option.pixelSize=Downscaling
|
||||
value.pixelSize.1=Off
|
||||
value.pixelSize.2=Low (2x)
|
||||
|
@ -16,11 +17,15 @@ value.pixelSize.4=Medium (4x)
|
|||
value.pixelSize.8=High (8x)
|
||||
value.pixelSize.16=Silly (16x)
|
||||
|
||||
|
||||
screen.COLOR=Color
|
||||
|
||||
option.colorMode=Color Mode
|
||||
value.colorMode.0=HSV
|
||||
value.colorMode.1=RGB
|
||||
|
||||
option.dithering=Dithering
|
||||
|
||||
option.colorDepth=RGB Depth
|
||||
value.colorDepth.1=Monochrome
|
||||
value.colorDepth.3=3-bit
|
||||
|
@ -30,10 +35,13 @@ value.colorDepth.12=12-bit
|
|||
value.colorDepth.15=15-bit
|
||||
value.colorDepth.18=18-bit
|
||||
value.colorDepth.24=Truecolor
|
||||
|
||||
option.monoPalette=Mono Palette
|
||||
value.monoPalette.0=Black & White
|
||||
value.monoPalette.1=Dot Matrix
|
||||
value.monoPalette.2=Paint the Town
|
||||
value.monoPalette.3=Noir
|
||||
|
||||
option.hueBits=Hue Depth
|
||||
suffix.hueBits=-bit
|
||||
option.satBits=Saturation Depth
|
||||
|
@ -41,14 +49,20 @@ suffix.satBits=-bit
|
|||
option.valBits=Value Depth
|
||||
suffix.valBits=-bit
|
||||
|
||||
|
||||
screen.SCREEN=Screen
|
||||
|
||||
option.interlacing=Interlacing
|
||||
|
||||
option.scanlines=Scanlines
|
||||
|
||||
option.aberration=Chromatic Aberration
|
||||
|
||||
|
||||
screen.CONSOLE=Consoles
|
||||
|
||||
screen.PSX=PSX (1994)
|
||||
|
||||
option.vWarp=Vertex Warping
|
||||
option.vWarp.comment=Emulates screen-space vertex snapping responsible for vertex wobble on the Playstation
|
||||
value.vWarp.0=Off
|
||||
|
@ -58,24 +72,30 @@ value.vWarp.4=Medium (4x)
|
|||
value.vWarp.8=High (8x)
|
||||
value.vWarp.16=Extreme (16x)
|
||||
value.vWarp.32=Silly (32x)
|
||||
|
||||
option.tWarp=Texture Warping
|
||||
option.tWarp.comment=Emulates affine texture mapping responsible for warping textures on the Playstation
|
||||
|
||||
|
||||
screen.REALITY=Project Reality (1996)
|
||||
|
||||
option.hBlur=Horizontal Blur
|
||||
option.hBlur.comment=Emulates the blur responsible for reducing LCD clarity on the N64
|
||||
|
||||
|
||||
screen.FX=FX
|
||||
|
||||
option.dof=Depth of Field
|
||||
option.dof.comment=Downscale out-of-focus objects
|
||||
|
||||
option.dofRes=DoF Dither
|
||||
option.dofRes.comment=Whether DoF focus affects dither resolution.
|
||||
value.dofRes.0=Static
|
||||
value.dofRes.1=Dynamic
|
||||
|
||||
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)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
#include "/var/color_depth.glsl"
|
||||
|
||||
#define colorMode 0 // [0 1]
|
||||
|
||||
#define hueBits 2 // [1 2 3 4 5 6 7 8]
|
||||
|
@ -6,9 +8,9 @@
|
|||
#define valBits 2 // [1 2 3 4 5 6 7 8]
|
||||
|
||||
#define colorDepth 6 // [1 3 6 8 12 15 18 24]
|
||||
#define monoPalette 0 // [0 1 2]
|
||||
#define monoPalette 0 // [0 1 2 3]
|
||||
|
||||
#if colorMode == 0
|
||||
#if colorMode == MODE_HSV
|
||||
// -- HSV --
|
||||
|
||||
float bit_max(int bits) {
|
||||
|
@ -41,12 +43,18 @@
|
|||
vec3 colormax = vec3(256, 256, 256);
|
||||
#endif
|
||||
|
||||
#if monoPalette == 0
|
||||
vec3 monoColor = vec3(1, 1, 1);
|
||||
#elif monoPalette == 1
|
||||
vec3 monoColor = vec3(0.48, 0.72, 0.28);
|
||||
#elif monoPalette == 2
|
||||
vec3 monoColor = vec3(1, 0, 0);
|
||||
#if monoPalette == MONOCHROME_BW
|
||||
vec3 monoHigh = vec3(1);
|
||||
vec3 monoLow = vec3(0);
|
||||
#elif monoPalette == MONOCHROME_DOTMATRIX
|
||||
vec3 monoHigh = vec3(0.31, 0.40, 0.03);
|
||||
vec3 monoLow = vec3(0.17, 0.29, 0.13);
|
||||
#elif monoPalette == MONOCHROME_MOTIONSICK
|
||||
vec3 monoHigh = vec3(1, 0, 0);
|
||||
vec3 monoLow = vec3(0);
|
||||
#elif monoPalette == MONOCHROME_NOIR
|
||||
vec3 monoHigh = vec3(0.73, 0.67, 0.55);
|
||||
vec3 monoLow = vec3(0.26, 0.23, 0.19);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
|
||||
#include "/var/world.glsl"
|
||||
|
||||
#define worldCurvature 0 // [0 1 2]
|
||||
#define worldRadius 512 // [1024 512 256 -256]
|
||||
|
||||
void world_curvature() {
|
||||
#if worldCurvature == 1
|
||||
#if worldCurvature == CURVATURE_CYLINDER
|
||||
float z = gl_Position.z * gl_Position.z;
|
||||
gl_Position.y -= 2 * z / worldRadius;
|
||||
#elif worldCurvature == 2
|
||||
#elif worldCurvature == CURVATURE_ROUND
|
||||
vec2 xz = gl_Position.xz;
|
||||
gl_Position.y -= round(( dot(xz, xz) / worldRadius ) * 8) / 8;
|
||||
#endif
|
||||
|
|
11
shaders/var/color_depth.glsl
Normal file
11
shaders/var/color_depth.glsl
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
// color mode IDs
|
||||
#define MODE_HSV 0
|
||||
#define MODE_RGB 1
|
||||
|
||||
// monochrome palette IDs
|
||||
#define MONOCHROME_BW 0
|
||||
#define MONOCHROME_DOTMATRIX 1
|
||||
#define MONOCHROME_MOTIONSICK 2
|
||||
#define MONOCHROME_NOIR 3
|
||||
|
6
shaders/var/world.glsl
Normal file
6
shaders/var/world.glsl
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
// world curvature IDs
|
||||
#define CURVATURE_OFF 0
|
||||
#define CURVATURE_CYLINDER 1
|
||||
#define CURVATURE_ROUND 2
|
||||
|
Loading…
Reference in a new issue