mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-29 19:01:31 +11:00
Merge pull request #63 from Monroe88/handheld-color
Update handheld color shaders to version 9.0
This commit is contained in:
commit
4cc7452c99
|
@ -3,3 +3,4 @@ shaders = 1
|
|||
shader0 = shaders/color/gba-color.slang
|
||||
filter_linear0 = false
|
||||
scale_type_0 = source
|
||||
scale0 = 1.0
|
||||
|
|
|
@ -5,28 +5,28 @@ filter_linear0 = "false"
|
|||
scale_type0 = "source"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/color/gba-color.slang"
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "source"
|
||||
scale_type1 = "viewport"
|
||||
scale1 = "1.0"
|
||||
|
||||
shader2 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader2 = "shaders/color/gba-color.slang"
|
||||
filter_linear2 = "false"
|
||||
scale_type2 = "viewport"
|
||||
scale_type2 = "source"
|
||||
scale2 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
shaders = "2"
|
||||
|
||||
shader0 = "shaders/color/gba-color.slang"
|
||||
shader0 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear0 = "false"
|
||||
scale_type0 = "source"
|
||||
scale_type0 = "viewport"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader1 = "shaders/color/gba-color.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "viewport"
|
||||
scale_type1 = "source"
|
||||
scale1 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
|
@ -5,28 +5,28 @@ filter_linear0 = "false"
|
|||
scale_type0 = "source"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/color/nds-color.slang"
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "source"
|
||||
scale_type1 = "viewport"
|
||||
scale1 = "1.0"
|
||||
|
||||
shader2 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader2 = "shaders/color/nds-color.slang"
|
||||
filter_linear2 = "false"
|
||||
scale_type2 = "viewport"
|
||||
scale_type2 = "source"
|
||||
scale2 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
shaders = "2"
|
||||
|
||||
shader0 = "shaders/color/nds-color.slang"
|
||||
shader0 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear0 = "false"
|
||||
scale_type0 = "source"
|
||||
scale_type0 = "viewport"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader1 = "shaders/color/nds-color.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "viewport"
|
||||
scale_type1 = "source"
|
||||
scale1 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
32
handheld/lcd-grid-v2-palm-color-motionblur.slangp
Normal file
32
handheld/lcd-grid-v2-palm-color-motionblur.slangp
Normal file
|
@ -0,0 +1,32 @@
|
|||
shaders = "3"
|
||||
|
||||
shader0 = "../motionblur/shaders/motionblur-simple.slang"
|
||||
filter_linear0 = "false"
|
||||
scale_type0 = "source"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "viewport"
|
||||
scale1 = "1.0"
|
||||
|
||||
shader2 = "shaders/color/palm-color.slang"
|
||||
filter_linear2 = "false"
|
||||
scale_type2 = "source"
|
||||
scale2 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
27
handheld/lcd-grid-v2-palm-color.slangp
Normal file
27
handheld/lcd-grid-v2-palm-color.slangp
Normal file
|
@ -0,0 +1,27 @@
|
|||
shaders = "2"
|
||||
|
||||
shader0 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear0 = "false"
|
||||
scale_type0 = "viewport"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/color/palm-color.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "source"
|
||||
scale1 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
|
@ -5,28 +5,28 @@ filter_linear0 = "false"
|
|||
scale_type0 = "source"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/color/psp-color.slang"
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "source"
|
||||
scale_type1 = "viewport"
|
||||
scale1 = "1.0"
|
||||
|
||||
shader2 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader2 = "shaders/color/psp-color.slang"
|
||||
filter_linear2 = "false"
|
||||
scale_type2 = "viewport"
|
||||
scale_type2 = "source"
|
||||
scale2 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
shaders = "2"
|
||||
|
||||
shader0 = "shaders/color/psp-color.slang"
|
||||
shader0 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear0 = "false"
|
||||
scale_type0 = "source"
|
||||
scale_type0 = "viewport"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader1 = "shaders/color/psp-color.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "viewport"
|
||||
scale_type1 = "source"
|
||||
scale1 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
|
@ -5,28 +5,28 @@ filter_linear0 = "false"
|
|||
scale_type0 = "source"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/color/vba-color.slang"
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "source"
|
||||
scale_type1 = "viewport"
|
||||
scale1 = "1.0"
|
||||
|
||||
shader2 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader2 = "shaders/color/vba-color.slang"
|
||||
filter_linear2 = "false"
|
||||
scale_type2 = "viewport"
|
||||
scale_type2 = "source"
|
||||
scale2 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
shaders = "2"
|
||||
|
||||
shader0 = "shaders/color/vba-color.slang"
|
||||
shader0 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
filter_linear0 = "false"
|
||||
scale_type0 = "source"
|
||||
scale_type0 = "viewport"
|
||||
scale0 = "1.0"
|
||||
|
||||
shader1 = "shaders/lcd-cgwg/lcd-grid-v2.slang"
|
||||
shader1 = "shaders/color/vba-color.slang"
|
||||
filter_linear1 = "false"
|
||||
scale_type1 = "viewport"
|
||||
scale_type1 = "source"
|
||||
scale1 = "1.0"
|
||||
|
||||
parameters = "RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR"
|
||||
RSUBPIX_R = "1.000000"
|
||||
RSUBPIX_R = "0.750000"
|
||||
RSUBPIX_G = "0.000000"
|
||||
RSUBPIX_B = "0.000000"
|
||||
GSUBPIX_R = "0.000000"
|
||||
GSUBPIX_G = "1.000000"
|
||||
GSUBPIX_G = "0.750000"
|
||||
GSUBPIX_B = "0.000000"
|
||||
BSUBPIX_R = "0.000000"
|
||||
BSUBPIX_G = "0.000000"
|
||||
BSUBPIX_B = "1.000000"
|
||||
gain = "1.250000"
|
||||
gamma = "3.000000"
|
||||
blacklevel = "0.050000"
|
||||
BSUBPIX_B = "0.750000"
|
||||
gain = "1.500000"
|
||||
gamma = "2.200000"
|
||||
blacklevel = "0.000000"
|
||||
ambient = "0.000000"
|
||||
BGR = "1.000000"
|
||||
|
|
|
@ -3,3 +3,4 @@ shaders = 1
|
|||
shader0 = shaders/color/nds-color.slang
|
||||
filter_linear0 = false
|
||||
scale_type_0 = source
|
||||
scale0 = 1.0
|
||||
|
|
6
handheld/palm-color.slangp
Normal file
6
handheld/palm-color.slangp
Normal file
|
@ -0,0 +1,6 @@
|
|||
shaders = 1
|
||||
|
||||
shader0 = shaders/color/palm-color.slang
|
||||
filter_linear0 = false
|
||||
scale_type_0 = source
|
||||
scale0 = 1.0
|
|
@ -3,3 +3,4 @@ shaders = 1
|
|||
shader0 = shaders/color/psp-color.slang
|
||||
filter_linear0 = false
|
||||
scale_type_0 = source
|
||||
scale0 = 1.0
|
||||
|
|
|
@ -21,25 +21,25 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
|||
*/
|
||||
// Shader that replicates the LCD dynamics from a GameBoy Advance
|
||||
|
||||
#pragma parameter darken_screen "Darken Screen" 0.5 0.0 1.0 0.05
|
||||
#pragma parameter darken_screen "Darken Screen" 0.5 0.0 2.0 0.05
|
||||
|
||||
#define target_gamma 2.2
|
||||
#define display_gamma 2.5
|
||||
#define display_gamma 2.2
|
||||
#define sat 1.0
|
||||
#define lum 0.99
|
||||
#define lum 1.0
|
||||
#define contrast 1.0
|
||||
#define blr 0.0
|
||||
#define blg 0.0
|
||||
#define blb 0.0
|
||||
#define r 0.84
|
||||
#define r 0.82
|
||||
#define g 0.67
|
||||
#define b 0.73
|
||||
#define rg 0.09
|
||||
#define rb 0.15
|
||||
#define gr 0.18
|
||||
#define gb 0.10
|
||||
#define br 0.0
|
||||
#define bg 0.26
|
||||
#define rb 0.16
|
||||
#define gr 0.24
|
||||
#define gb 0.11
|
||||
#define br -0.06
|
||||
#define bg 0.24
|
||||
#define overscan_percent_x 0.0
|
||||
#define overscan_percent_y 0.0
|
||||
|
||||
|
@ -78,5 +78,5 @@ mat4 adjust = mat4((1.0 - sat) * 0.3086 + sat, (1.0 - sat) * 0.3086, (1.0 - sat)
|
|||
color *= adjust;
|
||||
screen = clamp(screen * lum, 0.0, 1.0);
|
||||
screen = color * screen;
|
||||
FragColor = pow(screen, vec4(1.0 / display_gamma + (params.darken_screen / 8)));
|
||||
FragColor = pow(screen, vec4(1.0 / (display_gamma)));
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
#version 450
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
float target_gamma;
|
||||
} params;
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 MVP;
|
||||
|
@ -21,24 +16,23 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
|||
*/
|
||||
// Shader that replicates the LCD dynamics from a Nintendo DS Phat
|
||||
|
||||
#pragma parameter target_gamma "Gamma Mode" 2.0 2.0 2.4 0.2
|
||||
|
||||
#define display_gamma 2.20
|
||||
#define sat 1.01
|
||||
#define target_gamma 2.2
|
||||
#define display_gamma 2.2
|
||||
#define sat 1.0
|
||||
#define lum 1.0
|
||||
#define contrast 1.0
|
||||
#define blr 0.0
|
||||
#define blg 0.0
|
||||
#define blb 0.0
|
||||
#define r 0.74
|
||||
#define g 0.63
|
||||
#define b 0.74
|
||||
#define rg 0.10
|
||||
#define r 0.81
|
||||
#define g 0.665
|
||||
#define b 0.80
|
||||
#define rg 0.09
|
||||
#define rb 0.09
|
||||
#define gr 0.26
|
||||
#define gb 0.11
|
||||
#define br 0.0
|
||||
#define bg 0.27
|
||||
#define br -0.07
|
||||
#define bg 0.245
|
||||
#define overscan_percent_x 0.0
|
||||
#define overscan_percent_y 0.0
|
||||
|
||||
|
@ -60,7 +54,7 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
|||
|
||||
void main()
|
||||
{
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(params.target_gamma)).rgba;
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(target_gamma)).rgba;
|
||||
vec4 avglum = vec4(0.5);
|
||||
screen = mix(screen, avglum, (1.0 - contrast));
|
||||
|
||||
|
|
82
handheld/shaders/color/palm-color.slang
Normal file
82
handheld/shaders/color/palm-color.slang
Normal file
|
@ -0,0 +1,82 @@
|
|||
#version 450
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
float palm_gamma;
|
||||
} params;
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 MVP;
|
||||
vec4 OutputSize;
|
||||
vec4 OriginalSize;
|
||||
vec4 SourceSize;
|
||||
} global;
|
||||
|
||||
/*
|
||||
Shader Modified: Pokefan531
|
||||
Color Mangler
|
||||
Author: hunterk
|
||||
License: Public domain
|
||||
*/
|
||||
// Shader that replicates the LCD dynamics from Palm OS Phones
|
||||
|
||||
#pragma parameter palm_gamma "Use Palm's Gamma" 0.0 0.0 1.0 1.0
|
||||
|
||||
#define target_gamma 2.2
|
||||
#define display_gamma 2.2
|
||||
#define sat 1.0
|
||||
#define lum 1.0
|
||||
#define contrast 1.0
|
||||
#define blr 0.0
|
||||
#define blg 0.0
|
||||
#define blb 0.0
|
||||
#define r 0.745
|
||||
#define g 0.69
|
||||
#define b 0.775
|
||||
#define rg 0.06
|
||||
#define rb 0.085
|
||||
#define gr 0.315
|
||||
#define gb 0.14
|
||||
#define br -0.06
|
||||
#define bg 0.25
|
||||
#define overscan_percent_x 0.0
|
||||
#define overscan_percent_y 0.0
|
||||
|
||||
#pragma stage vertex
|
||||
layout(location = 0) in vec4 Position;
|
||||
layout(location = 1) in vec2 TexCoord;
|
||||
layout(location = 0) out vec2 vTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
}
|
||||
|
||||
#pragma stage fragment
|
||||
layout(location = 0) in vec2 vTexCoord;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(target_gamma + (params.palm_gamma * 0.4))).rgba;
|
||||
vec4 avglum = vec4(0.5);
|
||||
screen = mix(screen, avglum, (1.0 - contrast));
|
||||
|
||||
// r g b black
|
||||
mat4 color = mat4(r, rg, rb, 0.0, //red channel
|
||||
gr, g, gb, 0.0, //green channel
|
||||
br, bg, b, 0.0, //blue channel
|
||||
blr, blg, blb, 0.0); //alpha channel; these numbers do nothing for our purposes.
|
||||
|
||||
mat4 adjust = mat4((1.0 - sat) * 0.3086 + sat, (1.0 - sat) * 0.3086, (1.0 - sat) * 0.3086, 1.0,
|
||||
(1.0 - sat) * 0.6094, (1.0 - sat) * 0.6094 + sat, (1.0 - sat) * 0.6094, 1.0,
|
||||
(1.0 - sat) * 0.0820, (1.0 - sat) * 0.0820, (1.0 - sat) * 0.0820 + sat, 1.0,
|
||||
0.0, 0.0, 0.0, 1.0);
|
||||
color *= adjust;
|
||||
screen = clamp(screen * lum, 0.0, 1.0);
|
||||
screen = color * screen;
|
||||
FragColor = pow(screen, vec4(1.0 / (display_gamma)));
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
#version 450
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
float target_gamma;
|
||||
} params;
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 MVP;
|
||||
|
@ -21,8 +16,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
|||
*/
|
||||
|
||||
// Shader that replicates the LCD dynamics from PSP 1000 and PSP 2000
|
||||
#pragma parameter target_gamma "Gamma Mode" 2.2 2.2 2.4 0.2
|
||||
|
||||
#define target_gamma 2.21
|
||||
#define display_gamma 2.2
|
||||
#define sat 1.0
|
||||
#define lum 1.0
|
||||
|
@ -30,14 +24,14 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
|||
#define blr 0.0
|
||||
#define blg 0.0
|
||||
#define blb 0.0
|
||||
#define r 0.95
|
||||
#define g 0.80
|
||||
#define b 0.98
|
||||
#define rg 0.03
|
||||
#define r 0.92
|
||||
#define g 0.795
|
||||
#define b 0.975
|
||||
#define rg 0.035
|
||||
#define rb 0.01
|
||||
#define gr 0.02
|
||||
#define gb 0.01
|
||||
#define br 0.0
|
||||
#define gr 0.24
|
||||
#define gb 0.015
|
||||
#define br -0.16
|
||||
#define bg 0.17
|
||||
#define overscan_percent_x 0.0
|
||||
#define overscan_percent_y 0.0
|
||||
|
@ -60,7 +54,7 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
|||
|
||||
void main()
|
||||
{
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(params.target_gamma)).rgba;
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(target_gamma)).rgba;
|
||||
vec4 avglum = vec4(0.5);
|
||||
screen = mix(screen, avglum, (1.0 - contrast));
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
float target_gamma;
|
||||
float darken_screen;
|
||||
} params;
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
|
@ -19,10 +19,11 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
|||
Author: hunterk
|
||||
License: Public domain
|
||||
*/
|
||||
// Shader that replicates the LCD dynamics from a GameBoy Advance
|
||||
// Shader that replicates the LCD dynamics from a GameBoy Advance based from VBA-M and No$GBA
|
||||
|
||||
#pragma parameter target_gamma "Darken Intensity" 2.9 1.0 2.9 0.05
|
||||
#pragma parameter darken_screen "Darken Screen" 1.0 0.0 1.0 0.05
|
||||
|
||||
#define target_gamma 1.45
|
||||
#define display_gamma 1.45
|
||||
#define sat 1.0
|
||||
#define lum 1.0
|
||||
|
@ -60,7 +61,7 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
|||
|
||||
void main()
|
||||
{
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(params.target_gamma)).rgba;
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(target_gamma + (params.darken_screen * 1.7))).rgba;
|
||||
vec4 avglum = vec4(0.5);
|
||||
screen = mix(screen, avglum, (1.0 - contrast));
|
||||
|
||||
|
@ -77,5 +78,5 @@ mat4 adjust = mat4((1.0 - sat) * 0.3086 + sat, (1.0 - sat) * 0.3086, (1.0 - sat)
|
|||
color *= adjust;
|
||||
screen = clamp(screen * lum, 0.0, 1.0);
|
||||
screen = color * screen;
|
||||
FragColor = pow(screen, vec4(1.0 / display_gamma));
|
||||
FragColor = pow(screen, vec4(1.0 / (display_gamma)));
|
||||
}
|
|
@ -3,3 +3,4 @@ shaders = 1
|
|||
shader0 = shaders/color/vba-color.slang
|
||||
filter_linear0 = false
|
||||
scale_type_0 = source
|
||||
scale0 = 1.0
|
||||
|
|
16
reshade/gba.slangp
Normal file
16
reshade/gba.slangp
Normal file
|
@ -0,0 +1,16 @@
|
|||
shaders = 1
|
||||
|
||||
shader0 = shaders/LUT/LUT.slang
|
||||
filter_linear0 = "false"
|
||||
scale_type_x0 = "source"
|
||||
scale_x0 = "1.000000"
|
||||
scale_type_y0 = "source"
|
||||
scale_y0 = "1.000000"
|
||||
|
||||
textures = SamplerLUT
|
||||
|
||||
SamplerLUT = shaders/LUT/GBA.png
|
||||
SamplerLUT_linear = true
|
||||
|
||||
parameters = "LUT_Size"
|
||||
LUT_Size = "32.000000"
|
16
reshade/nds.slangp
Normal file
16
reshade/nds.slangp
Normal file
|
@ -0,0 +1,16 @@
|
|||
shaders = 1
|
||||
|
||||
shader0 = shaders/LUT/LUT.slang
|
||||
filter_linear0 = "false"
|
||||
scale_type_x0 = "source"
|
||||
scale_x0 = "1.000000"
|
||||
scale_type_y0 = "source"
|
||||
scale_y0 = "1.000000"
|
||||
|
||||
textures = SamplerLUT
|
||||
|
||||
SamplerLUT = shaders/LUT/NDS.png
|
||||
SamplerLUT_linear = true
|
||||
|
||||
parameters = "LUT_Size"
|
||||
LUT_Size = "32.000000"
|
BIN
reshade/shaders/LUT/GBA.png
Normal file
BIN
reshade/shaders/LUT/GBA.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -48,7 +48,7 @@ void main()
|
|||
float green = ( imgColor.g * (params.LUT_Size - 1.0) + 0.4999 ) / params.LUT_Size;
|
||||
float blue1 = (floor( imgColor.b * (params.LUT_Size - 1.0) ) / params.LUT_Size) + red;
|
||||
float blue2 = (ceil( imgColor.b * (params.LUT_Size - 1.0) ) / params.LUT_Size) + red;
|
||||
float mixer = max((imgColor.b - blue1) / (blue2 - blue1), 0.0);
|
||||
float mixer = clamp(max((imgColor.b - blue1) / (blue2 - blue1), 0.0), 0.0, 1.0);
|
||||
vec4 color1 = texture( SamplerLUT, vec2( blue1, green ));
|
||||
vec4 color2 = texture( SamplerLUT, vec2( blue2, green ));
|
||||
FragColor = mixfix(color1, color2, mixer);
|
||||
|
|
BIN
reshade/shaders/LUT/NDS.png
Normal file
BIN
reshade/shaders/LUT/NDS.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
reshade/shaders/LUT/VBA.png
Normal file
BIN
reshade/shaders/LUT/VBA.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
16
reshade/vba.slangp
Normal file
16
reshade/vba.slangp
Normal file
|
@ -0,0 +1,16 @@
|
|||
shaders = 1
|
||||
|
||||
shader0 = shaders/LUT/LUT.slang
|
||||
filter_linear0 = "false"
|
||||
scale_type_x0 = "source"
|
||||
scale_x0 = "1.000000"
|
||||
scale_type_y0 = "source"
|
||||
scale_y0 = "1.000000"
|
||||
|
||||
textures = SamplerLUT
|
||||
|
||||
SamplerLUT = shaders/LUT/VBA.png
|
||||
SamplerLUT_linear = true
|
||||
|
||||
parameters = "LUT_Size"
|
||||
LUT_Size = "32.000000"
|
Loading…
Reference in a new issue