Compare commits

..

No commits in common. "933cb21020834ac8dfd264ea3f66d94af87668d6" and "fcd88cd03b59a3a27354b0c1994a4fcad6fe8d01" have entirely different histories.

6 changed files with 17 additions and 66 deletions

View file

@ -125,20 +125,20 @@ void main() {
#endif #endif
vec3 color = texture2D(gcolor, newcoord).rgb; vec3 color = texture2D(gcolor, newcoord).rgb;
#if colorMode == MODE_HSV #if colorMode == 0
color = rgb2hsv(color).xyz; color = rgb2hsv(color).xyz;
#endif #endif
vec3 final; vec3 final;
#ifdef dithering #ifdef dithering
#if colorMode == MODE_HSV #if colorMode == 0
vec3 filtered = vec3(dither(color.x, hueMax), dither(color.y, satMax), dither(color.z, valMax)).rgb; vec3 filtered = vec3(dither(color.x, hueMax), dither(color.y, satMax), dither(color.z, valMax)).rgb;
final = hsv2rgb(filtered); final = hsv2rgb(filtered);
#else #else
final = vec3(dither(color.r, colormax.x), dither(color.g, colormax.y), dither(color.b, colormax.z)); final = vec3(dither(color.r, colormax.x), dither(color.g, colormax.y), dither(color.b, colormax.z));
#endif #endif
#else #else
#if colorMode == MODE_HSV #if colorMode == 0
vec3 filtered = vec3(lightnessStep(color.x, hueMax), lightnessStep(color.y, satMax), lightnessStep(color.z, valMax)).rgb; vec3 filtered = vec3(lightnessStep(color.x, hueMax), lightnessStep(color.y, satMax), lightnessStep(color.z, valMax)).rgb;
final = hsv2rgb(filtered); final = hsv2rgb(filtered);
#else #else
@ -146,11 +146,9 @@ void main() {
#endif #endif
#endif #endif
#if colorMode == MODE_RGB && colorDepth == 1 #if colorMode == 1 && colorDepth == 1
if(final.r == 1) if(final.r == 1)
final = monoHigh; final = monoColor;
else
final = monoLow;
#endif #endif
#ifdef interlacing #ifdef interlacing

View file

@ -9,7 +9,6 @@ profile.REALITY=Project Reality
profile.SNES=Super Famicom profile.SNES=Super Famicom
profile.VR32=VR32 profile.VR32=VR32
option.pixelSize=Downscaling option.pixelSize=Downscaling
value.pixelSize.1=Off value.pixelSize.1=Off
value.pixelSize.2=Low (2x) value.pixelSize.2=Low (2x)
@ -17,15 +16,11 @@ value.pixelSize.4=Medium (4x)
value.pixelSize.8=High (8x) value.pixelSize.8=High (8x)
value.pixelSize.16=Silly (16x) value.pixelSize.16=Silly (16x)
screen.COLOR=Color screen.COLOR=Color
option.colorMode=Color Mode option.colorMode=Color Mode
value.colorMode.0=HSV value.colorMode.0=HSV
value.colorMode.1=RGB value.colorMode.1=RGB
option.dithering=Dithering option.dithering=Dithering
option.colorDepth=RGB Depth option.colorDepth=RGB Depth
value.colorDepth.1=Monochrome value.colorDepth.1=Monochrome
value.colorDepth.3=3-bit value.colorDepth.3=3-bit
@ -35,13 +30,10 @@ value.colorDepth.12=12-bit
value.colorDepth.15=15-bit value.colorDepth.15=15-bit
value.colorDepth.18=18-bit value.colorDepth.18=18-bit
value.colorDepth.24=Truecolor value.colorDepth.24=Truecolor
option.monoPalette=Mono Palette option.monoPalette=Mono Palette
value.monoPalette.0=Black & White value.monoPalette.0=Black & White
value.monoPalette.1=Dot Matrix value.monoPalette.1=Dot Matrix
value.monoPalette.2=Paint the Town value.monoPalette.2=Paint the Town
value.monoPalette.3=Noir
option.hueBits=Hue Depth option.hueBits=Hue Depth
suffix.hueBits=-bit suffix.hueBits=-bit
option.satBits=Saturation Depth option.satBits=Saturation Depth
@ -49,20 +41,14 @@ suffix.satBits=-bit
option.valBits=Value Depth option.valBits=Value Depth
suffix.valBits=-bit suffix.valBits=-bit
screen.SCREEN=Screen screen.SCREEN=Screen
option.interlacing=Interlacing option.interlacing=Interlacing
option.scanlines=Scanlines option.scanlines=Scanlines
option.aberration=Chromatic Aberration option.aberration=Chromatic Aberration
screen.CONSOLE=Consoles screen.CONSOLE=Consoles
screen.PSX=PSX (1994) screen.PSX=PSX (1994)
option.vWarp=Vertex Warping option.vWarp=Vertex Warping
option.vWarp.comment=Emulates screen-space vertex snapping responsible for vertex wobble on the Playstation option.vWarp.comment=Emulates screen-space vertex snapping responsible for vertex wobble on the Playstation
value.vWarp.0=Off value.vWarp.0=Off
@ -72,30 +58,24 @@ value.vWarp.4=Medium (4x)
value.vWarp.8=High (8x) value.vWarp.8=High (8x)
value.vWarp.16=Extreme (16x) value.vWarp.16=Extreme (16x)
value.vWarp.32=Silly (32x) value.vWarp.32=Silly (32x)
option.tWarp=Texture Warping option.tWarp=Texture Warping
option.tWarp.comment=Emulates affine texture mapping responsible for warping textures on the Playstation option.tWarp.comment=Emulates affine texture mapping responsible for warping textures on the Playstation
screen.REALITY=Project Reality (1996) screen.REALITY=Project Reality (1996)
option.hBlur=Horizontal Blur option.hBlur=Horizontal Blur
option.hBlur.comment=Emulates the blur responsible for reducing LCD clarity on the N64 option.hBlur.comment=Emulates the blur responsible for reducing LCD clarity on the N64
screen.FX=FX screen.FX=FX
option.dof=Depth of Field option.dof=Depth of Field
option.dof.comment=Downscale out-of-focus objects option.dof.comment=Downscale out-of-focus objects
option.dofRes=DoF Dither option.dofRes=DoF Dither
option.dofRes.comment=Whether DoF focus affects dither resolution. option.dofRes.comment=Whether DoF focus affects dither resolution.
value.dofRes.0=Static
value.dofRes.1=Dynamic
option.worldCurvature=World Curvature option.worldCurvature=World Curvature
value.worldCurvature.0=Off value.worldCurvature.0=Off
value.worldCurvature.1=Cylinder value.worldCurvature.1=Cylinder
value.worldCurvature.2=Round value.worldCurvature.2=Round
option.worldRadius=Curvature Strength option.worldRadius=Curvature Strength
value.worldRadius.1024=Low (1024) value.worldRadius.1024=Low (1024)
value.worldRadius.512=Medium (512) value.worldRadius.512=Medium (512)

View file

@ -1,6 +1,4 @@
#include "/var/color_depth.glsl"
#define colorMode 0 // [0 1] #define colorMode 0 // [0 1]
#define hueBits 2 // [1 2 3 4 5 6 7 8] #define hueBits 2 // [1 2 3 4 5 6 7 8]
@ -8,9 +6,9 @@
#define valBits 2 // [1 2 3 4 5 6 7 8] #define valBits 2 // [1 2 3 4 5 6 7 8]
#define colorDepth 6 // [1 3 6 8 12 15 18 24] #define colorDepth 6 // [1 3 6 8 12 15 18 24]
#define monoPalette 0 // [0 1 2 3] #define monoPalette 0 // [0 1 2]
#if colorMode == MODE_HSV #if colorMode == 0
// -- HSV -- // -- HSV --
float bit_max(int bits) { float bit_max(int bits) {
@ -43,18 +41,12 @@
vec3 colormax = vec3(256, 256, 256); vec3 colormax = vec3(256, 256, 256);
#endif #endif
#if monoPalette == MONOCHROME_BW #if monoPalette == 0
vec3 monoHigh = vec3(1); vec3 monoColor = vec3(1, 1, 1);
vec3 monoLow = vec3(0); #elif monoPalette == 1
#elif monoPalette == MONOCHROME_DOTMATRIX vec3 monoColor = vec3(0.48, 0.72, 0.28);
vec3 monoHigh = vec3(0.31, 0.40, 0.03); #elif monoPalette == 2
vec3 monoLow = vec3(0.17, 0.29, 0.13); vec3 monoColor = vec3(1, 0, 0);
#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
#endif #endif

View file

@ -1,14 +1,12 @@
#include "/var/world.glsl"
#define worldCurvature 0 // [0 1 2] #define worldCurvature 0 // [0 1 2]
#define worldRadius 512 // [1024 512 256 -256] #define worldRadius 512 // [1024 512 256 -256]
void world_curvature() { void world_curvature() {
#if worldCurvature == CURVATURE_CYLINDER #if worldCurvature == 1
float z = gl_Position.z * gl_Position.z; float z = gl_Position.z * gl_Position.z;
gl_Position.y -= 2 * z / worldRadius; gl_Position.y -= 2 * z / worldRadius;
#elif worldCurvature == CURVATURE_ROUND #elif worldCurvature == 2
vec2 xz = gl_Position.xz; vec2 xz = gl_Position.xz;
gl_Position.y -= round(( dot(xz, xz) / worldRadius ) * 8) / 8; gl_Position.y -= round(( dot(xz, xz) / worldRadius ) * 8) / 8;
#endif #endif

View file

@ -1,11 +0,0 @@
// 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

View file

@ -1,6 +0,0 @@
// world curvature IDs
#define CURVATURE_OFF 0
#define CURVATURE_CYLINDER 1
#define CURVATURE_ROUND 2