From f94e503be7630c9fad2bc8c2b9277d4713142424 Mon Sep 17 00:00:00 2001 From: Tatsuya79 Date: Wed, 6 Sep 2017 20:33:28 +0200 Subject: [PATCH] GB borders nvidia fix and new presets. --- handheld/console-border/dmg-2x.slangp | 3 --- handheld/console-border/dmg-3x.slangp | 3 --- handheld/console-border/dmg-4x.slangp | 3 --- handheld/console-border/dmg-5x.slangp | 3 --- handheld/console-border/dmg-6x.slangp | 3 --- handheld/console-border/gb-pocket-2x.slangp | 9 ++++++++- handheld/console-border/gb-pocket-3x.slangp | 9 ++++++++- handheld/console-border/gb-pocket-4x.slangp | 9 ++++++++- handheld/console-border/gb-pocket-5x.slangp | 9 ++++++++- handheld/console-border/gb-pocket-6x.slangp | 9 ++++++++- handheld/console-border/shader-files/gb-pass0.slang | 2 +- handheld/console-border/shader-files/gb-pass4.slang | 2 +- 12 files changed, 42 insertions(+), 22 deletions(-) diff --git a/handheld/console-border/dmg-2x.slangp b/handheld/console-border/dmg-2x.slangp index b29f090..2b2d781 100644 --- a/handheld/console-border/dmg-2x.slangp +++ b/handheld/console-border/dmg-2x.slangp @@ -40,9 +40,6 @@ video_scale = "3.0" SCALE = "0.6667" OUT_X = "1600.0" OUT_Y = "800.0" -adjacent_texel_alpha_blending = "0.38" -pixel_opacity = "0.90" -shadow_opacity = "0.90" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/dmg-palette.png diff --git a/handheld/console-border/dmg-3x.slangp b/handheld/console-border/dmg-3x.slangp index 659eb01..09f29b2 100644 --- a/handheld/console-border/dmg-3x.slangp +++ b/handheld/console-border/dmg-3x.slangp @@ -38,9 +38,6 @@ video_scale = "3.0" SCALE = "1.0" OUT_X = "2400.0" OUT_Y = "1200.0" -adjacent_texel_alpha_blending = "0.42" -pixel_opacity = "0.80" -shadow_opacity = "0.80" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/dmg-palette.png diff --git a/handheld/console-border/dmg-4x.slangp b/handheld/console-border/dmg-4x.slangp index 5d05ee8..7a62b12 100644 --- a/handheld/console-border/dmg-4x.slangp +++ b/handheld/console-border/dmg-4x.slangp @@ -38,9 +38,6 @@ video_scale = "4.0" SCALE = "1.0" OUT_X = "3200.0" OUT_Y = "1600.0" -adjacent_texel_alpha_blending = "0.34" -pixel_opacity = "0.80" -shadow_opacity = "0.80" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/dmg-palette.png diff --git a/handheld/console-border/dmg-5x.slangp b/handheld/console-border/dmg-5x.slangp index baa57ff..8fcdb3a 100644 --- a/handheld/console-border/dmg-5x.slangp +++ b/handheld/console-border/dmg-5x.slangp @@ -38,9 +38,6 @@ video_scale = "4.0" SCALE = "1.25" OUT_X = "4000.0" OUT_Y = "2000.0" -adjacent_texel_alpha_blending = "0.34" -pixel_opacity = "0.80" -shadow_opacity = "0.80" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/dmg-palette.png diff --git a/handheld/console-border/dmg-6x.slangp b/handheld/console-border/dmg-6x.slangp index beab23d..15a7ea7 100644 --- a/handheld/console-border/dmg-6x.slangp +++ b/handheld/console-border/dmg-6x.slangp @@ -38,9 +38,6 @@ video_scale = "4.0" SCALE = "1.5" OUT_X = "4800.0" OUT_Y = "2400.0" -adjacent_texel_alpha_blending = "0.34" -pixel_opacity = "0.80" -shadow_opacity = "0.80" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/dmg-palette.png diff --git a/handheld/console-border/gb-pocket-2x.slangp b/handheld/console-border/gb-pocket-2x.slangp index bc84ec5..5c3285c 100644 --- a/handheld/console-border/gb-pocket-2x.slangp +++ b/handheld/console-border/gb-pocket-2x.slangp @@ -35,11 +35,18 @@ filter_linear5 = true scale_type5 = source scale5 = 1.0 -parameters = "video_scale;SCALE;OUT_X;OUT_Y" +parameters = "video_scale;SCALE;OUT_X;OUT_Y;baseline_alpha;grey_balance;contrast;screen_light;pixel_opacity;shadow_offset_x" video_scale = "3.0" SCALE = "0.6667" OUT_X = "1600.0" OUT_Y = "800.0" +baseline_alpha = "0.03" +grey_balance = "3.5" +contrast = "0.8" +screen_light = "0.9" +pixel_opacity = "0.95" +shadow_opacity = "0.9" +shadow_offset_x = "-2.0" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/pocket-palette.png diff --git a/handheld/console-border/gb-pocket-3x.slangp b/handheld/console-border/gb-pocket-3x.slangp index 0572ce9..5c7dbc8 100644 --- a/handheld/console-border/gb-pocket-3x.slangp +++ b/handheld/console-border/gb-pocket-3x.slangp @@ -33,11 +33,18 @@ alias4 = "PASS4" shader5 = shader-files/gb-pass-5.slang filter_linear5 = true -parameters = "video_scale;SCALE;OUT_X;OUT_Y" +parameters = "video_scale;SCALE;OUT_X;OUT_Y;baseline_alpha;grey_balance;contrast;screen_light;pixel_opacity;shadow_offset_x" video_scale = "3.0" SCALE = "1.0" OUT_X = "2400.0" OUT_Y = "1200.0" +baseline_alpha = "0.03" +grey_balance = "3.5" +contrast = "0.8" +screen_light = "0.9" +pixel_opacity = "0.95" +shadow_opacity = "0.9" +shadow_offset_x = "-2.0" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/pocket-palette.png diff --git a/handheld/console-border/gb-pocket-4x.slangp b/handheld/console-border/gb-pocket-4x.slangp index 73e1d12..22b0138 100644 --- a/handheld/console-border/gb-pocket-4x.slangp +++ b/handheld/console-border/gb-pocket-4x.slangp @@ -33,11 +33,18 @@ alias4 = "PASS4" shader5 = shader-files/gb-pass-5.slang filter_linear5 = true -parameters = "video_scale;SCALE;OUT_X;OUT_Y" +parameters = "video_scale;SCALE;OUT_X;OUT_Y;baseline_alpha;grey_balance;contrast;screen_light;pixel_opacity;shadow_offset_x" video_scale = "4.0" SCALE = "1.0" OUT_X = "3200.0" OUT_Y = "1600.0" +baseline_alpha = "0.03" +grey_balance = "3.5" +contrast = "0.8" +screen_light = "0.9" +pixel_opacity = "0.95" +shadow_opacity = "0.9" +shadow_offset_x = "-2.0" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/pocket-palette.png diff --git a/handheld/console-border/gb-pocket-5x.slangp b/handheld/console-border/gb-pocket-5x.slangp index 437d5eb..208e37a 100644 --- a/handheld/console-border/gb-pocket-5x.slangp +++ b/handheld/console-border/gb-pocket-5x.slangp @@ -33,11 +33,18 @@ alias4 = "PASS4" shader5 = shader-files/gb-pass-5.slang filter_linear5 = true -parameters = "video_scale;SCALE;OUT_X;OUT_Y" +parameters = "video_scale;SCALE;OUT_X;OUT_Y;baseline_alpha;grey_balance;contrast;screen_light;pixel_opacity;shadow_offset_x" video_scale = "4.0" SCALE = "1.25" OUT_X = "4000.0" OUT_Y = "2000.0" +baseline_alpha = "0.03" +grey_balance = "3.5" +contrast = "0.8" +screen_light = "0.9" +pixel_opacity = "0.95" +shadow_opacity = "0.9" +shadow_offset_x = "-2.0" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/pocket-palette.png diff --git a/handheld/console-border/gb-pocket-6x.slangp b/handheld/console-border/gb-pocket-6x.slangp index 955c842..0e80efe 100644 --- a/handheld/console-border/gb-pocket-6x.slangp +++ b/handheld/console-border/gb-pocket-6x.slangp @@ -33,11 +33,18 @@ alias4 = "PASS4" shader5 = shader-files/gb-pass-5.slang filter_linear5 = true -parameters = "video_scale;SCALE;OUT_X;OUT_Y" +parameters = "video_scale;SCALE;OUT_X;OUT_Y;baseline_alpha;grey_balance;contrast;screen_light;pixel_opacity;shadow_offset_x" video_scale = "4.0" SCALE = "1.5" OUT_X = "4800.0" OUT_Y = "2400.0" +baseline_alpha = "0.03" +grey_balance = "3.5" +contrast = "0.8" +screen_light = "0.9" +pixel_opacity = "0.95" +shadow_opacity = "0.9" +shadow_offset_x = "-2.0" textures = COLOR_PALETTE;BACKGROUND;BORDER COLOR_PALETTE = resources/pocket-palette.png diff --git a/handheld/console-border/shader-files/gb-pass0.slang b/handheld/console-border/shader-files/gb-pass0.slang index aea5c1f..ac225ef 100644 --- a/handheld/console-border/shader-files/gb-pass0.slang +++ b/handheld/console-border/shader-files/gb-pass0.slang @@ -86,7 +86,7 @@ void main() vec2 scaled_video_out = (registers.SourceSize.xy * vec2(registers.video_scale)); // Remaps position to integer scaled output 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; one_texel = 1.0 / (registers.SourceSize.xy * registers.video_scale); } diff --git a/handheld/console-border/shader-files/gb-pass4.slang b/handheld/console-border/shader-files/gb-pass4.slang index b900973..0155a99 100644 --- a/handheld/console-border/shader-files/gb-pass4.slang +++ b/handheld/console-border/shader-files/gb-pass4.slang @@ -126,7 +126,7 @@ layout(set = 0, binding = 4) uniform sampler2D COLOR_PALETTE; void main() { vec2 tex = floor(registers.PassOutputSize1.xy * vTexCoord); - tex = (tex ) * registers.PassOutputSize1.zw; + tex = (tex + 0.5) * registers.PassOutputSize1.zw; // Sample all the relevant textures vec4 foreground = texture(PassOutput1, tex - screen_offset);