mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-23 00:01:31 +11:00
make dmg and gb-pocket console-borders match original Cg
This commit is contained in:
parent
8301ecf850
commit
2dbc0d86e7
|
@ -35,26 +35,14 @@ filter_linear5 = true
|
||||||
scale_type5 = source
|
scale_type5 = source
|
||||||
scale5 = 1.0
|
scale5 = 1.0
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y;adjacent_texel_alpha_blending;pixel_opacity;shadow_opacity"
|
||||||
video_scale = "3.0"
|
video_scale = "3.0"
|
||||||
SCALE = "0.6667"
|
SCALE = "0.6667"
|
||||||
OUT_X = "1600.0"
|
OUT_X = "1600.0"
|
||||||
OUT_Y = "800.0"
|
OUT_Y = "800.0"
|
||||||
baseline_alpha = "0.05"
|
|
||||||
response_time = "0.333"
|
|
||||||
grey_balance = "2.6"
|
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
adjacent_texel_alpha_blending = "0.38"
|
||||||
contrast = "0.7"
|
pixel_opacity = "0.90"
|
||||||
screen_light = "0.85"
|
shadow_opacity = "0.90"
|
||||||
pixel_opacity = "0.9"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/dmg-palette.png
|
COLOR_PALETTE = resources/dmg-palette.png
|
||||||
|
|
|
@ -33,26 +33,14 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y;adjacent_texel_alpha_blending;pixel_opacity;shadow_opacity"
|
||||||
video_scale = "3.0"
|
video_scale = "3.0"
|
||||||
SCALE = "1.0"
|
SCALE = "1.0"
|
||||||
OUT_X = "2400.0"
|
OUT_X = "2400.0"
|
||||||
OUT_Y = "1200.0"
|
OUT_Y = "1200.0"
|
||||||
baseline_alpha = "0.05"
|
adjacent_texel_alpha_blending = "0.42"
|
||||||
response_time = "0.333"
|
pixel_opacity = "0.80"
|
||||||
grey_balance = "2.6"
|
shadow_opacity = "0.80"
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.7"
|
|
||||||
screen_light = "0.85"
|
|
||||||
pixel_opacity = "0.9"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/dmg-palette.png
|
COLOR_PALETTE = resources/dmg-palette.png
|
||||||
|
|
|
@ -33,26 +33,14 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y;adjacent_texel_alpha_blending;pixel_opacity;shadow_opacity"
|
||||||
video_scale = "4.0"
|
video_scale = "4.0"
|
||||||
SCALE = "1.0"
|
SCALE = "1.0"
|
||||||
OUT_X = "3200.0"
|
OUT_X = "3200.0"
|
||||||
OUT_Y = "1600.0"
|
OUT_Y = "1600.0"
|
||||||
baseline_alpha = "0.05"
|
adjacent_texel_alpha_blending = "0.34"
|
||||||
response_time = "0.333"
|
pixel_opacity = "0.80"
|
||||||
grey_balance = "2.6"
|
shadow_opacity = "0.80"
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.7"
|
|
||||||
screen_light = "0.85"
|
|
||||||
pixel_opacity = "0.9"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/dmg-palette.png
|
COLOR_PALETTE = resources/dmg-palette.png
|
||||||
|
|
|
@ -33,26 +33,14 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y;adjacent_texel_alpha_blending;pixel_opacity;shadow_opacity"
|
||||||
video_scale = "4.0"
|
video_scale = "4.0"
|
||||||
SCALE = "1.25"
|
SCALE = "1.25"
|
||||||
OUT_X = "4000.0"
|
OUT_X = "4000.0"
|
||||||
OUT_Y = "2000.0"
|
OUT_Y = "2000.0"
|
||||||
baseline_alpha = "0.05"
|
adjacent_texel_alpha_blending = "0.34"
|
||||||
response_time = "0.333"
|
pixel_opacity = "0.80"
|
||||||
grey_balance = "2.6"
|
shadow_opacity = "0.80"
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.7"
|
|
||||||
screen_light = "0.85"
|
|
||||||
pixel_opacity = "0.9"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/dmg-palette.png
|
COLOR_PALETTE = resources/dmg-palette.png
|
||||||
|
|
|
@ -33,26 +33,14 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y;adjacent_texel_alpha_blending;pixel_opacity;shadow_opacity"
|
||||||
video_scale = "4.0"
|
video_scale = "4.0"
|
||||||
SCALE = "1.5"
|
SCALE = "1.5"
|
||||||
OUT_X = "4800.0"
|
OUT_X = "4800.0"
|
||||||
OUT_Y = "2400.0"
|
OUT_Y = "2400.0"
|
||||||
baseline_alpha = "0.05"
|
adjacent_texel_alpha_blending = "0.34"
|
||||||
response_time = "0.333"
|
pixel_opacity = "0.80"
|
||||||
grey_balance = "2.6"
|
shadow_opacity = "0.80"
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.7"
|
|
||||||
screen_light = "0.85"
|
|
||||||
pixel_opacity = "0.9"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/dmg-palette.png
|
COLOR_PALETTE = resources/dmg-palette.png
|
||||||
|
|
|
@ -35,26 +35,11 @@ filter_linear5 = true
|
||||||
scale_type5 = source
|
scale_type5 = source
|
||||||
scale5 = 1.0
|
scale5 = 1.0
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y"
|
||||||
video_scale = "3.0"
|
video_scale = "3.0"
|
||||||
SCALE = "0.6667"
|
SCALE = "0.6667"
|
||||||
OUT_X = "1600.0"
|
OUT_X = "1600.0"
|
||||||
OUT_Y = "800.0"
|
OUT_Y = "800.0"
|
||||||
baseline_alpha = "0.03"
|
|
||||||
response_time = "0.333"
|
|
||||||
grey_balance = "3.5"
|
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.8"
|
|
||||||
screen_light = "0.9"
|
|
||||||
pixel_opacity = "0.95"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/pocket-palette.png
|
COLOR_PALETTE = resources/pocket-palette.png
|
||||||
|
|
|
@ -33,26 +33,11 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y"
|
||||||
video_scale = "3.0"
|
video_scale = "3.0"
|
||||||
SCALE = "1.0"
|
SCALE = "1.0"
|
||||||
OUT_X = "2400.0"
|
OUT_X = "2400.0"
|
||||||
OUT_Y = "1200.0"
|
OUT_Y = "1200.0"
|
||||||
baseline_alpha = "0.03"
|
|
||||||
response_time = "0.333"
|
|
||||||
grey_balance = "3.5"
|
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.8"
|
|
||||||
screen_light = "0.9"
|
|
||||||
pixel_opacity = "0.95"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/pocket-palette.png
|
COLOR_PALETTE = resources/pocket-palette.png
|
||||||
|
|
|
@ -33,26 +33,11 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y"
|
||||||
video_scale = "4.0"
|
video_scale = "4.0"
|
||||||
SCALE = "1.0"
|
SCALE = "1.0"
|
||||||
OUT_X = "3200.0"
|
OUT_X = "3200.0"
|
||||||
OUT_Y = "1600.0"
|
OUT_Y = "1600.0"
|
||||||
baseline_alpha = "0.03"
|
|
||||||
response_time = "0.333"
|
|
||||||
grey_balance = "3.5"
|
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.8"
|
|
||||||
screen_light = "0.9"
|
|
||||||
pixel_opacity = "0.95"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/pocket-palette.png
|
COLOR_PALETTE = resources/pocket-palette.png
|
||||||
|
|
|
@ -33,26 +33,11 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y"
|
||||||
video_scale = "4.0"
|
video_scale = "4.0"
|
||||||
SCALE = "1.25"
|
SCALE = "1.25"
|
||||||
OUT_X = "4000.0"
|
OUT_X = "4000.0"
|
||||||
OUT_Y = "2000.0"
|
OUT_Y = "2000.0"
|
||||||
baseline_alpha = "0.03"
|
|
||||||
response_time = "0.333"
|
|
||||||
grey_balance = "3.5"
|
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.8"
|
|
||||||
screen_light = "0.9"
|
|
||||||
pixel_opacity = "0.95"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/pocket-palette.png
|
COLOR_PALETTE = resources/pocket-palette.png
|
||||||
|
|
|
@ -33,26 +33,11 @@ alias4 = "PASS4"
|
||||||
shader5 = shader-files/gb-pass-5.slang
|
shader5 = shader-files/gb-pass-5.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
|
|
||||||
parameters = "video_scale;baseline_alpha;response_time;grey_balance;blending_mode;adjacent_texel_alpha_blending;contrast;screen_light;pixel_opacity;bg_smoothing;shadow_opacity;shadow_offset_x;shadow_offset_y;screen_offset_x;screen_offset_y;console_border_enable;SCALE;OUT_X;OUT_Y"
|
parameters = "video_scale;SCALE;OUT_X;OUT_Y"
|
||||||
video_scale = "4.0"
|
video_scale = "4.0"
|
||||||
SCALE = "1.5"
|
SCALE = "1.5"
|
||||||
OUT_X = "4800.0"
|
OUT_X = "4800.0"
|
||||||
OUT_Y = "2400.0"
|
OUT_Y = "2400.0"
|
||||||
baseline_alpha = "0.03"
|
|
||||||
response_time = "0.333"
|
|
||||||
grey_balance = "3.5"
|
|
||||||
blending_mode = "0.0"
|
|
||||||
adjacent_texel_alpha_blending = "0.38"
|
|
||||||
contrast = "0.8"
|
|
||||||
screen_light = "0.9"
|
|
||||||
pixel_opacity = "0.95"
|
|
||||||
bg_smoothing = "0.0"
|
|
||||||
shadow_opacity = "0.9"
|
|
||||||
shadow_offset_x = "-2.0"
|
|
||||||
shadow_offset_y = "1.5"
|
|
||||||
screen_offset_x = "0.0"
|
|
||||||
screen_offset_y = "0.0"
|
|
||||||
console_border_enable = "1.0"
|
|
||||||
|
|
||||||
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
textures = COLOR_PALETTE;BACKGROUND;BORDER
|
||||||
COLOR_PALETTE = resources/pocket-palette.png
|
COLOR_PALETTE = resources/pocket-palette.png
|
||||||
|
|
|
@ -9,7 +9,6 @@ layout(push_constant) uniform Push
|
||||||
float baseline_alpha;
|
float baseline_alpha;
|
||||||
float grey_balance;
|
float grey_balance;
|
||||||
float response_time;
|
float response_time;
|
||||||
float console_border_enable;
|
|
||||||
float video_scale;
|
float video_scale;
|
||||||
} registers;
|
} registers;
|
||||||
|
|
||||||
|
@ -24,17 +23,14 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
// The alpha value of dots in their "off" state
|
// The alpha value of dots in their "off" state
|
||||||
// Does not affect the border region of the screen - [0, 1]
|
// Does not affect the border region of the screen - [0, 1]
|
||||||
#pragma parameter baseline_alpha "Baseline Alpha" 0.10 0.0 1.0 0.01
|
#pragma parameter baseline_alpha "Baseline Alpha" 0.05 0.0 1.0 0.01
|
||||||
|
|
||||||
// Fine-tune the balance between the different shades of grey
|
// Fine-tune the balance between the different shades of grey
|
||||||
#pragma parameter grey_balance "Grey Balance" 3.0 2.0 4.0 0.1
|
#pragma parameter grey_balance "Grey Balance" 2.6 2.0 4.0 0.1
|
||||||
|
|
||||||
// Simulate response time
|
// Simulate response time
|
||||||
// Higher values result in longer color transition periods - [0, 1]
|
// Higher values result in longer color transition periods - [0, 1]
|
||||||
#pragma parameter response_time "LCD Response Time" 0.333 0.0 0.777 0.111
|
#pragma parameter response_time "LCD Response Time" 0.20 0.0 0.777 0.111
|
||||||
|
|
||||||
// Change scaling to enable use in console-border shaders
|
|
||||||
#pragma parameter console_border_enable "Console-Border Enable" 0.0 0.0 1.0 1.0
|
|
||||||
|
|
||||||
// Set video scale when used in console-border shaders
|
// Set video scale when used in console-border shaders
|
||||||
#pragma parameter video_scale "Video Scale" 3.0 3.0 5.0 1.0
|
#pragma parameter video_scale "Video Scale" 3.0 3.0 5.0 1.0
|
||||||
|
@ -87,14 +83,12 @@ layout(location = 3) out vec2 one_texel;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float video_scale_factor = floor(registers.OutputSize.y * registers.SourceSize.w);
|
vec2 scaled_video_out = (registers.SourceSize.xy * vec2(registers.video_scale));
|
||||||
if (registers.console_border_enable > 0.5) video_scale_factor = registers.video_scale;
|
|
||||||
vec2 scaled_video_out = (registers.SourceSize.xy * vec2(video_scale_factor));
|
|
||||||
// Remaps position to integer scaled output
|
// Remaps position to integer scaled output
|
||||||
gl_Position = global.MVP * Position / vec4( vec2(registers.OutputSize.xy / scaled_video_out), 1.0, 1.0 );
|
gl_Position = global.MVP * Position / vec4( vec2(registers.OutputSize.xy / scaled_video_out), 1.0, 1.0 );
|
||||||
vTexCoord = TexCoord + half_pixel;
|
vTexCoord = TexCoord;// + half_pixel;
|
||||||
dot_size = registers.SourceSize.zw;
|
dot_size = registers.SourceSize.zw;
|
||||||
one_texel = 1.0 / (registers.SourceSize.xy * video_scale_factor);
|
one_texel = 1.0 / (registers.SourceSize.xy * registers.video_scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -20,10 +20,10 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
// 0 - only the space between dots is blending
|
// 0 - only the space between dots is blending
|
||||||
// 1 - all texels are blended
|
// 1 - all texels are blended
|
||||||
#pragma parameter blending_mode "Blending Mode" 1.0 0.0 1.0 1.0
|
#pragma parameter blending_mode "Blending Mode" 0.0 0.0 1.0 1.0
|
||||||
|
|
||||||
// The amount of alpha swapped between neighboring texels
|
// The amount of alpha swapped between neighboring texels
|
||||||
#pragma parameter adjacent_texel_alpha_blending "Neighbor Blending" 0.1755 0.0 1.0 0.05
|
#pragma parameter adjacent_texel_alpha_blending "Neighbor Blending" 0.38 0.0 1.0 0.05
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// //
|
// //
|
||||||
|
|
|
@ -28,37 +28,37 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
// Useful to fine-tune the colors.
|
// Useful to fine-tune the colors.
|
||||||
// Higher values make the "black" color closer to black - [0, 1] [DEFAULT: 0.95]
|
// Higher values make the "black" color closer to black - [0, 1] [DEFAULT: 0.95]
|
||||||
#pragma parameter contrast "Contrast" 0.95 0.0 1.0 0.05
|
#pragma parameter contrast "Contrast" 0.70 0.0 1.0 0.05
|
||||||
|
|
||||||
// Controls the ambient light of the screen.
|
// Controls the ambient light of the screen.
|
||||||
// Lower values darken the screen - [0, 2] [DEFAULT: 1.00]
|
// Lower values darken the screen - [0, 2] [DEFAULT: 1.00]
|
||||||
#pragma parameter screen_light "Ambient Screen Light" 1.0 0.0 2.0 0.05
|
#pragma parameter screen_light "Ambient Screen Light" 0.85 0.0 2.0 0.05
|
||||||
|
|
||||||
// Controls the opacity of the dot-matrix pixels.
|
// Controls the opacity of the dot-matrix pixels.
|
||||||
// Lower values make pixels more transparent - [0, 1] [DEFAULT: 1.00]
|
// Lower values make pixels more transparent - [0, 1] [DEFAULT: 1.00]
|
||||||
#pragma parameter pixel_opacity "Pixel Opacity" 1.0 0.01 1.0 0.01
|
#pragma parameter pixel_opacity "Pixel Opacity" 0.9 0.01 1.0 0.01
|
||||||
|
|
||||||
// Higher values suppress changes in background color directly beneath
|
// Higher values suppress changes in background color directly beneath
|
||||||
// the foreground to improve image clarity - [0, 1] [DEFAULT: 0.75]
|
// the foreground to improve image clarity - [0, 1] [DEFAULT: 0.75]
|
||||||
#pragma parameter bg_smoothing "Background Smooth" 0.75 0.0 1.0 0.05
|
#pragma parameter bg_smoothing "Background Smooth" 0.0 0.0 1.0 0.05
|
||||||
|
|
||||||
// How strongly shadows affect the background
|
// How strongly shadows affect the background
|
||||||
// Higher values darken the shadows - [0, 1] [DEFAULT: 0.55]
|
// Higher values darken the shadows - [0, 1] [DEFAULT: 0.55]
|
||||||
#pragma parameter shadow_opacity "Shadow Opacity" 0.55 0.01 1.0 0.01
|
#pragma parameter shadow_opacity "Shadow Opacity" 0.90 0.01 1.0 0.01
|
||||||
|
|
||||||
// How far the shadow should be shifted to the
|
// How far the shadow should be shifted to the
|
||||||
// right in pixels - [-infinity, infinity] [DEFAULT: 1.0]
|
// right in pixels - [-infinity, infinity] [DEFAULT: 1.0]
|
||||||
#pragma parameter shadow_offset_x "Shadow Offset Horiz" 1.0 -5.0 5.0 0.5
|
#pragma parameter shadow_offset_x "Shadow Offset Horiz" -1.5 -5.0 5.0 0.5
|
||||||
|
|
||||||
// How far the shadow should be shifted
|
// How far the shadow should be shifted
|
||||||
// down in pixels - [-infinity, infinity] [DEFAULT: 1.5]
|
// down in pixels - [-infinity, infinity] [DEFAULT: 1.5]
|
||||||
#pragma parameter shadow_offset_y "Shadow Offset Vert" 1.0 -5.0 5.0 0.5
|
#pragma parameter shadow_offset_y "Shadow Offset Vert" 1.5 -5.0 5.0 0.5
|
||||||
|
|
||||||
// Screen offset - [-infinity, infinity] [DEFAULT: 0]
|
// Screen offset - [-infinity, infinity] [DEFAULT: 0]
|
||||||
#pragma parameter screen_offset_x "Screen Offset Horiz" 0.0 -5.0 5.0 0.5
|
#pragma parameter screen_offset_x "Screen Offset Horiz" 0.0 -5.0 5.0 0.5
|
||||||
|
|
||||||
// Screen offset - [-infinity, infinity] [DEFAULT: 0]
|
// Screen offset - [-infinity, infinity] [DEFAULT: 0]
|
||||||
#pragma parameter screen_offset_y "Screen Offset Vert" 0.0 -5.0 5.0 0.5
|
#pragma parameter screen_offset_y "Screen Offset Vert" 0.0 -5.0 5.0 0.5
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// //
|
// //
|
||||||
|
@ -126,7 +126,7 @@ layout(set = 0, binding = 4) uniform sampler2D COLOR_PALETTE;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec2 tex = floor(registers.PassOutputSize1.xy * vTexCoord);
|
vec2 tex = floor(registers.PassOutputSize1.xy * vTexCoord);
|
||||||
tex = (tex + 0.5) * registers.PassOutputSize1.zw;
|
tex = (tex ) * registers.PassOutputSize1.zw;
|
||||||
|
|
||||||
// Sample all the relevant textures
|
// Sample all the relevant textures
|
||||||
vec4 foreground = texture(PassOutput1, tex - screen_offset);
|
vec4 foreground = texture(PassOutput1, tex - screen_offset);
|
||||||
|
@ -136,6 +136,7 @@ void main()
|
||||||
|
|
||||||
// Foreground and background are blended with the background color
|
// Foreground and background are blended with the background color
|
||||||
foreground *= 1.0;
|
foreground *= 1.0;
|
||||||
|
|
||||||
background -= (background - 0.5) * registers.bg_smoothing * float(foreground.a > 0.0); //suppress drastic background color changes under the foreground to improve clarity
|
background -= (background - 0.5) * registers.bg_smoothing * float(foreground.a > 0.0); //suppress drastic background color changes under the foreground to improve clarity
|
||||||
|
|
||||||
// Allows for highlights,
|
// Allows for highlights,
|
||||||
|
|
Loading…
Reference in a new issue