summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--artwork/bgfx/border_blur/default.lay25
-rw-r--r--bgfx/chains/pillarbox_left_horizontal.json103
-rw-r--r--bgfx/chains/pillarbox_left_vertical.json103
-rw-r--r--bgfx/chains/pillarbox_right_horizontal.json103
-rw-r--r--bgfx/chains/pillarbox_right_vertical.json103
-rw-r--r--bgfx/effects/pillarbox_left_horizontal/blit.json121
-rw-r--r--bgfx/effects/pillarbox_left_horizontal/gaussian.json32
-rw-r--r--bgfx/effects/pillarbox_left_horizontal/saturation.json30
-rw-r--r--bgfx/effects/pillarbox_left_vertical/blit.json121
-rw-r--r--bgfx/effects/pillarbox_left_vertical/gaussian.json32
-rw-r--r--bgfx/effects/pillarbox_left_vertical/saturation.json30
-rw-r--r--bgfx/effects/pillarbox_right_horizontal/blit.json121
-rw-r--r--bgfx/effects/pillarbox_right_horizontal/gaussian.json32
-rw-r--r--bgfx/effects/pillarbox_right_horizontal/saturation.json30
-rw-r--r--bgfx/effects/pillarbox_right_vertical/blit.json121
-rw-r--r--bgfx/effects/pillarbox_right_vertical/gaussian.json32
-rw-r--r--bgfx/effects/pillarbox_right_vertical/saturation.json30
-rw-r--r--bgfx/layouts/sample/horizontal/default.lay25
-rw-r--r--bgfx/layouts/sample/vertical/default.lay25
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_blit.binbin0 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_gaussian.binbin0 -> 2663 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_saturation.binbin0 -> 523 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_blit.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_gaussian.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_saturation.binbin0 -> 615 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_blit.binbin0 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_gaussian.binbin0 -> 2663 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_saturation.binbin0 -> 523 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_blit.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_gaussian.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_saturation.binbin0 -> 615 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_blit.binbin0 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_gaussian.binbin0 -> 2663 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_saturation.binbin0 -> 523 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_blit.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_gaussian.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_saturation.binbin0 -> 615 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_blit.binbin0 -> 396 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_gaussian.binbin0 -> 2663 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_saturation.binbin0 -> 523 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_blit.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_gaussian.binbin0 -> 575 bytes
-rw-r--r--bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_saturation.binbin0 -> 615 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_blit.binbin0 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_gaussian.binbin0 -> 1512 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_saturation.binbin0 -> 372 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_blit.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_gaussian.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_saturation.binbin0 -> 362 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_blit.binbin0 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_gaussian.binbin0 -> 1512 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_saturation.binbin0 -> 372 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_blit.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_gaussian.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_saturation.binbin0 -> 362 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_blit.binbin0 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_gaussian.binbin0 -> 1512 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_saturation.binbin0 -> 372 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_blit.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_gaussian.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_saturation.binbin0 -> 362 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_blit.binbin0 -> 241 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_gaussian.binbin0 -> 1512 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_saturation.binbin0 -> 372 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_blit.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_gaussian.binbin0 -> 330 bytes
-rw-r--r--bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_saturation.binbin0 -> 362 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_blit.binbin0 -> 238 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_gaussian.binbin0 -> 2901 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_saturation.binbin0 -> 456 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_blit.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_gaussian.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_saturation.binbin0 -> 463 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_blit.binbin0 -> 238 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_gaussian.binbin0 -> 2901 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_saturation.binbin0 -> 456 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_blit.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_gaussian.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_saturation.binbin0 -> 466 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_blit.binbin0 -> 238 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_gaussian.binbin0 -> 2901 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_saturation.binbin0 -> 456 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_blit.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_gaussian.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_saturation.binbin0 -> 469 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_blit.binbin0 -> 238 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_gaussian.binbin0 -> 2901 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_saturation.binbin0 -> 456 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_blit.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_gaussian.binbin0 -> 419 bytes
-rw-r--r--bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_saturation.binbin0 -> 467 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_blit.binbin0 -> 181 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_gaussian.binbin0 -> 2861 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_saturation.binbin0 -> 429 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_blit.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_gaussian.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_saturation.binbin0 -> 421 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_blit.binbin0 -> 181 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_gaussian.binbin0 -> 2861 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_saturation.binbin0 -> 429 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_blit.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_gaussian.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_saturation.binbin0 -> 424 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_blit.binbin0 -> 181 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_gaussian.binbin0 -> 2861 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_saturation.binbin0 -> 429 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_blit.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_gaussian.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_saturation.binbin0 -> 427 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_blit.binbin0 -> 181 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_gaussian.binbin0 -> 2861 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_saturation.binbin0 -> 429 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_blit.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_gaussian.binbin0 -> 377 bytes
-rw-r--r--bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_saturation.binbin0 -> 425 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_blit.binbin0 -> 634 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_gaussian.binbin0 -> 5782 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_saturation.binbin0 -> 832 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_blit.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_gaussian.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_saturation.binbin0 -> 805 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_blit.binbin0 -> 634 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_gaussian.binbin0 -> 5782 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_saturation.binbin0 -> 832 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_blit.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_gaussian.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_saturation.binbin0 -> 808 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_blit.binbin0 -> 634 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_gaussian.binbin0 -> 5782 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_saturation.binbin0 -> 832 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_blit.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_gaussian.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_saturation.binbin0 -> 811 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_blit.binbin0 -> 634 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_gaussian.binbin0 -> 5782 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_saturation.binbin0 -> 832 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_blit.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_gaussian.binbin0 -> 757 bytes
-rw-r--r--bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_saturation.binbin0 -> 809 bytes
-rw-r--r--src/osd/modules/render/bgfx/chainmanager.cpp20
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_gaussian.sc57
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_saturation.sc25
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/varying.def.sc6
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_gaussian.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_saturation.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_gaussian.sc57
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_saturation.sc25
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/varying.def.sc6
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_gaussian.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_saturation.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_gaussian.sc57
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_saturation.sc25
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/varying.def.sc6
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_gaussian.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_saturation.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_gaussian.sc57
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_saturation.sc25
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/varying.def.sc6
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_blit.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_gaussian.sc14
-rw-r--r--src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_saturation.sc14
-rw-r--r--src/osd/modules/render/drawbgfx.cpp76
-rw-r--r--src/osd/modules/render/drawbgfx.h22
170 files changed, 1869 insertions, 44 deletions
diff --git a/artwork/bgfx/border_blur/default.lay b/artwork/bgfx/border_blur/default.lay
new file mode 100644
index 00000000000..1554a9ec50b
--- /dev/null
+++ b/artwork/bgfx/border_blur/default.lay
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+ <view name="Horizontal">
+ <screen index="0">
+ <bounds left="2" top="0" right="14" bottom="9" />
+ </screen>
+ <screen index="0">
+ <bounds left="0" top="0" right="2" bottom="9" />
+ </screen>
+ <screen index="0">
+ <bounds left="14" top="0" right="16" bottom="9" />
+ </screen>
+ </view>
+ <view name="Vertical">
+ <screen index="0">
+ <bounds left="18.5" top="0" right="45.5" bottom="36" />
+ </screen>
+ <screen index="0">
+ <bounds left="0" top="0" right="18.5" bottom="36" />
+ </screen>
+ <screen index="0">
+ <bounds left="45.5" top="0" right="64" bottom="36" />
+ </screen>
+ </view>
+</mamelayout> \ No newline at end of file
diff --git a/bgfx/chains/pillarbox_left_horizontal.json b/bgfx/chains/pillarbox_left_horizontal.json
new file mode 100644
index 00000000000..deff01f88d6
--- /dev/null
+++ b/bgfx/chains/pillarbox_left_horizontal.json
@@ -0,0 +1,103 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// pillarbox_left_horizontal.json: Fills in the left
+// portion of a pillarbox when displaying 4:3 content
+// on a 16:9 screen.
+//
+//============================================================
+{
+ "name": "Horizontal Pillarbox, Left",
+ "author": "Ryan Holtz",
+
+ "sliders": [
+ { "type": "float", "name": "saturation", "text": "Saturation", "default": 25, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }
+ ],
+
+ "targets": [
+ {
+ "name": "guest",
+ "mode": "guest",
+ "bilinear": true,
+ "doublebuffer": true
+ },
+ {
+ "name": "internal",
+ "mode": "native",
+ "bilinear": true,
+ "doublebuffer": true
+ }
+ ],
+
+ "passes": [
+ { "effect": "pillarbox_left_horizontal/blit",
+ "name": "Blit to scalable target",
+ "input": [
+ { "sampler": "s_tex", "target": "screen" }
+ ],
+ "output": "guest"
+ },
+ { "effect": "pillarbox_left_horizontal/gaussian",
+ "name": "Gaussian Blur 1, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "guest" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_horizontal/gaussian",
+ "name": "Gaussian Blur 1, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ {
+ "effect": "pillarbox_left_horizontal/saturation",
+ "name": "Saturation Pass",
+ "disablewhen": [
+ { "type": "slider", "condition": "equal", "name": "saturation", "value": 100 }
+ ],
+ "uniforms": [
+ { "uniform": "u_saturation", "slider": "saturation" }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_horizontal/gaussian",
+ "name": "Gaussian Blur 2, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_horizontal/gaussian",
+ "name": "Gaussian Blur 2, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_horizontal/blit",
+ "name": "Final Blit",
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "output"
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/chains/pillarbox_left_vertical.json b/bgfx/chains/pillarbox_left_vertical.json
new file mode 100644
index 00000000000..187164695de
--- /dev/null
+++ b/bgfx/chains/pillarbox_left_vertical.json
@@ -0,0 +1,103 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// pillarbox_left_vertical.json: Fills in the left
+// portion of a pillarbox when displaying 4:3 content
+// on a 16:9 screen.
+//
+//============================================================
+{
+ "name": "Vertical Pillarbox, Left",
+ "author": "Ryan Holtz",
+
+ "sliders": [
+ { "type": "float", "name": "saturation", "text": "Saturation", "default": 25, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }
+ ],
+
+ "targets": [
+ {
+ "name": "guest",
+ "mode": "guest",
+ "bilinear": true,
+ "doublebuffer": true
+ },
+ {
+ "name": "internal",
+ "mode": "native",
+ "bilinear": true,
+ "doublebuffer": true
+ }
+ ],
+
+ "passes": [
+ { "effect": "pillarbox_left_vertical/blit",
+ "name": "Blit to scalable target",
+ "input": [
+ { "sampler": "s_tex", "target": "screen" }
+ ],
+ "output": "guest"
+ },
+ { "effect": "pillarbox_left_vertical/gaussian",
+ "name": "Gaussian Blur 1, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "guest" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_vertical/gaussian",
+ "name": "Gaussian Blur 1, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ {
+ "effect": "pillarbox_left_vertical/saturation",
+ "name": "Saturation Pass",
+ "disablewhen": [
+ { "type": "slider", "condition": "equal", "name": "saturation", "value": 100 }
+ ],
+ "uniforms": [
+ { "uniform": "u_saturation", "slider": "saturation" }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_vertical/gaussian",
+ "name": "Gaussian Blur 2, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_vertical/gaussian",
+ "name": "Gaussian Blur 2, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_left_vertical/blit",
+ "name": "Final Blit",
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "output"
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/chains/pillarbox_right_horizontal.json b/bgfx/chains/pillarbox_right_horizontal.json
new file mode 100644
index 00000000000..d7133aadbcc
--- /dev/null
+++ b/bgfx/chains/pillarbox_right_horizontal.json
@@ -0,0 +1,103 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// pillarbox_right_horizontal.json: Fills in the right
+// portion of a pillarbox when displaying 4:3 content
+// on a 16:9 screen.
+//
+//============================================================
+{
+ "name": "Horizontal Pillarbox, Right",
+ "author": "Ryan Holtz",
+
+ "sliders": [
+ { "type": "float", "name": "saturation", "text": "Saturation", "default": 25, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }
+ ],
+
+ "targets": [
+ {
+ "name": "guest",
+ "mode": "guest",
+ "bilinear": true,
+ "doublebuffer": true
+ },
+ {
+ "name": "internal",
+ "mode": "native",
+ "bilinear": true,
+ "doublebuffer": true
+ }
+ ],
+
+ "passes": [
+ { "effect": "pillarbox_right_horizontal/blit",
+ "name": "Blit to scalable target",
+ "input": [
+ { "sampler": "s_tex", "target": "screen" }
+ ],
+ "output": "guest"
+ },
+ { "effect": "pillarbox_right_horizontal/gaussian",
+ "name": "Gaussian Blur 1, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "guest" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_horizontal/gaussian",
+ "name": "Gaussian Blur 1, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ {
+ "effect": "pillarbox_right_horizontal/saturation",
+ "name": "Saturation Pass",
+ "disablewhen": [
+ { "type": "slider", "condition": "equal", "name": "saturation", "value": 100 }
+ ],
+ "uniforms": [
+ { "uniform": "u_saturation", "slider": "saturation" }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_horizontal/gaussian",
+ "name": "Gaussian Blur 2, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_horizontal/gaussian",
+ "name": "Gaussian Blur 2, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_horizontal/blit",
+ "name": "Final Blit",
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "output"
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/chains/pillarbox_right_vertical.json b/bgfx/chains/pillarbox_right_vertical.json
new file mode 100644
index 00000000000..072ba99956f
--- /dev/null
+++ b/bgfx/chains/pillarbox_right_vertical.json
@@ -0,0 +1,103 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// pillarbox_right_vertical.json: Fills in the right
+// portion of a pillarbox when displaying 4:3 content
+// on a 16:9 screen.
+//
+//============================================================
+{
+ "name": "Vertical Pillarbox, Right",
+ "author": "Ryan Holtz",
+
+ "sliders": [
+ { "type": "float", "name": "saturation", "text": "Saturation", "default": 25, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }
+ ],
+
+ "targets": [
+ {
+ "name": "guest",
+ "mode": "guest",
+ "bilinear": true,
+ "doublebuffer": true
+ },
+ {
+ "name": "internal",
+ "mode": "native",
+ "bilinear": true,
+ "doublebuffer": true
+ }
+ ],
+
+ "passes": [
+ { "effect": "pillarbox_right_vertical/blit",
+ "name": "Blit to scalable target",
+ "input": [
+ { "sampler": "s_tex", "target": "screen" }
+ ],
+ "output": "guest"
+ },
+ { "effect": "pillarbox_right_vertical/gaussian",
+ "name": "Gaussian Blur 1, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "guest" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_vertical/gaussian",
+ "name": "Gaussian Blur 1, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ {
+ "effect": "pillarbox_right_vertical/saturation",
+ "name": "Saturation Pass",
+ "disablewhen": [
+ { "type": "slider", "condition": "equal", "name": "saturation", "value": 100 }
+ ],
+ "uniforms": [
+ { "uniform": "u_saturation", "slider": "saturation" }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_vertical/gaussian",
+ "name": "Gaussian Blur 2, Horizontal",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 1.0, 0.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_vertical/gaussian",
+ "name": "Gaussian Blur 2, Vertical",
+ "uniforms": [
+ { "uniform": "u_dimension", "value": [ 0.0, 1.0 ] }
+ ],
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "internal"
+ },
+ { "effect": "pillarbox_right_vertical/blit",
+ "name": "Final Blit",
+ "input": [
+ { "sampler": "s_tex", "target": "internal" }
+ ],
+ "output": "output"
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_left_horizontal/blit.json b/bgfx/effects/pillarbox_left_horizontal/blit.json
new file mode 100644
index 00000000000..085dd67ef93
--- /dev/null
+++ b/bgfx/effects/pillarbox_left_horizontal/blit.json
@@ -0,0 +1,121 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// blit.json: A simple texture-to-target copy.
+//
+//============================================================
+{
+ // blend (required): The blend state for this effect.
+ "blend": {
+ // equation (optional): What equation to perform on the source and destination blend values.
+ // values: "add", "sub", "revSub", "min", "max"
+ // default: "add"
+ //
+ // "subtract" and "revSubtract" are provided as aliases for "sub" and "revSub"
+ "equation": "add",
+
+ // blend function parameters (optional): What factors to use in the blend function when calculating the final pixel.
+ // values: "0", "1", "srccolor", "1-srccolor", "dstcolor", "1-dstcolor", "srcalpha", "1-srcalpha", "dstalpha", "1-dstalpha"
+ // defaults (srcColor, srcAlpha): "1"
+ // defaults (dstColor, dstAlpha): "0"
+ //
+ // "zero", "one", "invsrccolor", "invdstcolor", "invsrcalpha", and "invdstalpha" are provided as aliases for "0", "1", "1-srccolor", "1-dstcolor", "1-srcalpha", and "1-dstalpha"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+
+ // depth (required): The depth state for this effect.
+ "depth": {
+ // function (optional): The depth function to use when drawing.
+ // values: "never", "less", "equal", "lequal", "greater", "notequal", "gequal", "always"
+ // default: "always"
+ "function": "always",
+
+ // writeenable (optional): Whether to store Z-buffer data.
+ // values: true, false
+ // default: false
+ "writeenable": false
+ },
+
+ // cull (required): The cull mode for this effect.
+ "cull": {
+ // mode (optional): What winding, if any, to cull.
+ // values: "none", "cw", "ccw"
+ // default: "ccw"
+ //
+ // "clockwise" and "counterclockwise" are provided as aliases for "cw" and "ccw"
+ "mode": "none"
+ },
+
+ // write (required): Write enable for color and alpha channels.
+ "write": {
+ // rgb (optional): Whether to store color data when drawing.
+ // values: true, false
+ // default: false
+ "rgb": true,
+
+ // alpha (optional): Whether to store alpha data when drawing.
+ // values: true, false
+ // default: false
+ "alpha": true
+ },
+
+ // vertex (required): The vertex shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "vertex": "chains/pillarbox_left_horizontal/vs_blit",
+
+ // pixel/fragment (required): The pixel or fragment shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "fragment": "chains/pillarbox_left_horizontal/fs_blit",
+
+ // uniforms (required): The list of uniforms for this effect. Can be empty, but must exist.
+ "uniforms": [
+ {
+ // name (required): The name of the uniform, as used in either the vertex or pixel/fragment shader.
+ // value: A string containing the name of the uniform as described above.
+ //
+ // NOTE: Some names correspond to special values that will be automatically filled by the BGFX
+ // code if they are used by the shader. These names are:
+ // "u_screen_dims"
+ // The dimensions of the first texture input if present, otherwise the dimensions of the output window.
+ // Valid values: xy
+ // "u_inv_screen_dims"
+ // The reciprocal of u_screen_dims.
+ // Valid values: xy
+ // "u_source_dims"
+ // The size, in pixels, of the screen texture incoming to the chain.
+ // Valid values: xy
+ // "u_rotation_type"
+ // This screen's rotation type. 0 if ROT0, 1 if ROT90, 2 if ROT180, 3 of ROT270.
+ // Valid values: x
+ // "u_swap_xy"
+ // Whether this screen is swapped on the X and Y axes. 1 if true, 0 if false.
+ // Valid values: x
+ // "u_quad_dims"
+ // The dimensions, in pixels, occupied by this one screen primitive itself in the output window.
+ // Valid values: xy
+ // "u_tex_sizeN"
+ // The dimensions, in pixels, of the texture in input pair N. Starts at 0.
+ // valid values: xy
+ "name": "s_tex",
+
+ // type (required): The type of the uniform.
+ // values: "int", "vec4", "mat3", "mat4"
+ //
+ // Note: "int" should only be used for samplers.
+ "type": "int",
+
+ // values (required): The array of numbers with which to initialize the uniform.
+ // value: A JSON array containin the correct amount of numbers to initialize a uniform of the
+ // above-specified type. The following size rules should be followed:
+ // "int": 1 float
+ // "vec4": 4 floats
+ // "mat3": 9 floats
+ // "mat4": 16 floats
+ "values": [ 1.0 ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_left_horizontal/gaussian.json b/bgfx/effects/pillarbox_left_horizontal/gaussian.json
new file mode 100644
index 00000000000..4eda0b9b368
--- /dev/null
+++ b/bgfx/effects/pillarbox_left_horizontal/gaussian.json
@@ -0,0 +1,32 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// gaussian.json: Separable gaussian blur.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_left_horizontal/vs_gaussian",
+ "fragment": "chains/pillarbox_left_horizontal/fs_gaussian",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_dimension", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_radius", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_left_horizontal/saturation.json b/bgfx/effects/pillarbox_left_horizontal/saturation.json
new file mode 100644
index 00000000000..8fff15ddb9b
--- /dev/null
+++ b/bgfx/effects/pillarbox_left_horizontal/saturation.json
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// saturation.json: Applies saturation to an image.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_left_horizontal/vs_saturation",
+ "fragment": "chains/pillarbox_left_horizontal/fs_saturation",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_saturation", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_left_vertical/blit.json b/bgfx/effects/pillarbox_left_vertical/blit.json
new file mode 100644
index 00000000000..9fb35a9fe19
--- /dev/null
+++ b/bgfx/effects/pillarbox_left_vertical/blit.json
@@ -0,0 +1,121 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// blit.json: A simple texture-to-target copy.
+//
+//============================================================
+{
+ // blend (required): The blend state for this effect.
+ "blend": {
+ // equation (optional): What equation to perform on the source and destination blend values.
+ // values: "add", "sub", "revSub", "min", "max"
+ // default: "add"
+ //
+ // "subtract" and "revSubtract" are provided as aliases for "sub" and "revSub"
+ "equation": "add",
+
+ // blend function parameters (optional): What factors to use in the blend function when calculating the final pixel.
+ // values: "0", "1", "srccolor", "1-srccolor", "dstcolor", "1-dstcolor", "srcalpha", "1-srcalpha", "dstalpha", "1-dstalpha"
+ // defaults (srcColor, srcAlpha): "1"
+ // defaults (dstColor, dstAlpha): "0"
+ //
+ // "zero", "one", "invsrccolor", "invdstcolor", "invsrcalpha", and "invdstalpha" are provided as aliases for "0", "1", "1-srccolor", "1-dstcolor", "1-srcalpha", and "1-dstalpha"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+
+ // depth (required): The depth state for this effect.
+ "depth": {
+ // function (optional): The depth function to use when drawing.
+ // values: "never", "less", "equal", "lequal", "greater", "notequal", "gequal", "always"
+ // default: "always"
+ "function": "always",
+
+ // writeenable (optional): Whether to store Z-buffer data.
+ // values: true, false
+ // default: false
+ "writeenable": false
+ },
+
+ // cull (required): The cull mode for this effect.
+ "cull": {
+ // mode (optional): What winding, if any, to cull.
+ // values: "none", "cw", "ccw"
+ // default: "ccw"
+ //
+ // "clockwise" and "counterclockwise" are provided as aliases for "cw" and "ccw"
+ "mode": "none"
+ },
+
+ // write (required): Write enable for color and alpha channels.
+ "write": {
+ // rgb (optional): Whether to store color data when drawing.
+ // values: true, false
+ // default: false
+ "rgb": true,
+
+ // alpha (optional): Whether to store alpha data when drawing.
+ // values: true, false
+ // default: false
+ "alpha": true
+ },
+
+ // vertex (required): The vertex shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "vertex": "chains/pillarbox_left_vertical/vs_blit",
+
+ // pixel/fragment (required): The pixel or fragment shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "fragment": "chains/pillarbox_left_vertical/fs_blit",
+
+ // uniforms (required): The list of uniforms for this effect. Can be empty, but must exist.
+ "uniforms": [
+ {
+ // name (required): The name of the uniform, as used in either the vertex or pixel/fragment shader.
+ // value: A string containing the name of the uniform as described above.
+ //
+ // NOTE: Some names correspond to special values that will be automatically filled by the BGFX
+ // code if they are used by the shader. These names are:
+ // "u_screen_dims"
+ // The dimensions of the first texture input if present, otherwise the dimensions of the output window.
+ // Valid values: xy
+ // "u_inv_screen_dims"
+ // The reciprocal of u_screen_dims.
+ // Valid values: xy
+ // "u_source_dims"
+ // The size, in pixels, of the screen texture incoming to the chain.
+ // Valid values: xy
+ // "u_rotation_type"
+ // This screen's rotation type. 0 if ROT0, 1 if ROT90, 2 if ROT180, 3 of ROT270.
+ // Valid values: x
+ // "u_swap_xy"
+ // Whether this screen is swapped on the X and Y axes. 1 if true, 0 if false.
+ // Valid values: x
+ // "u_quad_dims"
+ // The dimensions, in pixels, occupied by this one screen primitive itself in the output window.
+ // Valid values: xy
+ // "u_tex_sizeN"
+ // The dimensions, in pixels, of the texture in input pair N. Starts at 0.
+ // valid values: xy
+ "name": "s_tex",
+
+ // type (required): The type of the uniform.
+ // values: "int", "vec4", "mat3", "mat4"
+ //
+ // Note: "int" should only be used for samplers.
+ "type": "int",
+
+ // values (required): The array of numbers with which to initialize the uniform.
+ // value: A JSON array containin the correct amount of numbers to initialize a uniform of the
+ // above-specified type. The following size rules should be followed:
+ // "int": 1 float
+ // "vec4": 4 floats
+ // "mat3": 9 floats
+ // "mat4": 16 floats
+ "values": [ 1.0 ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_left_vertical/gaussian.json b/bgfx/effects/pillarbox_left_vertical/gaussian.json
new file mode 100644
index 00000000000..1db78806595
--- /dev/null
+++ b/bgfx/effects/pillarbox_left_vertical/gaussian.json
@@ -0,0 +1,32 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// gaussian.json: Separable gaussian blur.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_left_vertical/vs_gaussian",
+ "fragment": "chains/pillarbox_left_vertical/fs_gaussian",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_dimension", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_radius", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_left_vertical/saturation.json b/bgfx/effects/pillarbox_left_vertical/saturation.json
new file mode 100644
index 00000000000..c84b6d4a3a2
--- /dev/null
+++ b/bgfx/effects/pillarbox_left_vertical/saturation.json
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// saturation.json: Applies saturation to an image.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_left_vertical/vs_saturation",
+ "fragment": "chains/pillarbox_left_vertical/fs_saturation",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_saturation", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_right_horizontal/blit.json b/bgfx/effects/pillarbox_right_horizontal/blit.json
new file mode 100644
index 00000000000..e982da2dbf3
--- /dev/null
+++ b/bgfx/effects/pillarbox_right_horizontal/blit.json
@@ -0,0 +1,121 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// blit.json: A simple texture-to-target copy.
+//
+//============================================================
+{
+ // blend (required): The blend state for this effect.
+ "blend": {
+ // equation (optional): What equation to perform on the source and destination blend values.
+ // values: "add", "sub", "revSub", "min", "max"
+ // default: "add"
+ //
+ // "subtract" and "revSubtract" are provided as aliases for "sub" and "revSub"
+ "equation": "add",
+
+ // blend function parameters (optional): What factors to use in the blend function when calculating the final pixel.
+ // values: "0", "1", "srccolor", "1-srccolor", "dstcolor", "1-dstcolor", "srcalpha", "1-srcalpha", "dstalpha", "1-dstalpha"
+ // defaults (srcColor, srcAlpha): "1"
+ // defaults (dstColor, dstAlpha): "0"
+ //
+ // "zero", "one", "invsrccolor", "invdstcolor", "invsrcalpha", and "invdstalpha" are provided as aliases for "0", "1", "1-srccolor", "1-dstcolor", "1-srcalpha", and "1-dstalpha"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+
+ // depth (required): The depth state for this effect.
+ "depth": {
+ // function (optional): The depth function to use when drawing.
+ // values: "never", "less", "equal", "lequal", "greater", "notequal", "gequal", "always"
+ // default: "always"
+ "function": "always",
+
+ // writeenable (optional): Whether to store Z-buffer data.
+ // values: true, false
+ // default: false
+ "writeenable": false
+ },
+
+ // cull (required): The cull mode for this effect.
+ "cull": {
+ // mode (optional): What winding, if any, to cull.
+ // values: "none", "cw", "ccw"
+ // default: "ccw"
+ //
+ // "clockwise" and "counterclockwise" are provided as aliases for "cw" and "ccw"
+ "mode": "none"
+ },
+
+ // write (required): Write enable for color and alpha channels.
+ "write": {
+ // rgb (optional): Whether to store color data when drawing.
+ // values: true, false
+ // default: false
+ "rgb": true,
+
+ // alpha (optional): Whether to store alpha data when drawing.
+ // values: true, false
+ // default: false
+ "alpha": true
+ },
+
+ // vertex (required): The vertex shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "vertex": "chains/pillarbox_right_horizontal/vs_blit",
+
+ // pixel/fragment (required): The pixel or fragment shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "fragment": "chains/pillarbox_right_horizontal/fs_blit",
+
+ // uniforms (required): The list of uniforms for this effect. Can be empty, but must exist.
+ "uniforms": [
+ {
+ // name (required): The name of the uniform, as used in either the vertex or pixel/fragment shader.
+ // value: A string containing the name of the uniform as described above.
+ //
+ // NOTE: Some names correspond to special values that will be automatically filled by the BGFX
+ // code if they are used by the shader. These names are:
+ // "u_screen_dims"
+ // The dimensions of the first texture input if present, otherwise the dimensions of the output window.
+ // Valid values: xy
+ // "u_inv_screen_dims"
+ // The reciprocal of u_screen_dims.
+ // Valid values: xy
+ // "u_source_dims"
+ // The size, in pixels, of the screen texture incoming to the chain.
+ // Valid values: xy
+ // "u_rotation_type"
+ // This screen's rotation type. 0 if ROT0, 1 if ROT90, 2 if ROT180, 3 of ROT270.
+ // Valid values: x
+ // "u_swap_xy"
+ // Whether this screen is swapped on the X and Y axes. 1 if true, 0 if false.
+ // Valid values: x
+ // "u_quad_dims"
+ // The dimensions, in pixels, occupied by this one screen primitive itself in the output window.
+ // Valid values: xy
+ // "u_tex_sizeN"
+ // The dimensions, in pixels, of the texture in input pair N. Starts at 0.
+ // valid values: xy
+ "name": "s_tex",
+
+ // type (required): The type of the uniform.
+ // values: "int", "vec4", "mat3", "mat4"
+ //
+ // Note: "int" should only be used for samplers.
+ "type": "int",
+
+ // values (required): The array of numbers with which to initialize the uniform.
+ // value: A JSON array containin the correct amount of numbers to initialize a uniform of the
+ // above-specified type. The following size rules should be followed:
+ // "int": 1 float
+ // "vec4": 4 floats
+ // "mat3": 9 floats
+ // "mat4": 16 floats
+ "values": [ 1.0 ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_right_horizontal/gaussian.json b/bgfx/effects/pillarbox_right_horizontal/gaussian.json
new file mode 100644
index 00000000000..f19af39dd71
--- /dev/null
+++ b/bgfx/effects/pillarbox_right_horizontal/gaussian.json
@@ -0,0 +1,32 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// gaussian.json: Separable gaussian blur.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_right_horizontal/vs_gaussian",
+ "fragment": "chains/pillarbox_right_horizontal/fs_gaussian",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_dimension", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_radius", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_right_horizontal/saturation.json b/bgfx/effects/pillarbox_right_horizontal/saturation.json
new file mode 100644
index 00000000000..18a416ebd8e
--- /dev/null
+++ b/bgfx/effects/pillarbox_right_horizontal/saturation.json
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// saturation.json: Applies saturation to an image.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_right_horizontal/vs_saturation",
+ "fragment": "chains/pillarbox_right_horizontal/fs_saturation",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_saturation", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_right_vertical/blit.json b/bgfx/effects/pillarbox_right_vertical/blit.json
new file mode 100644
index 00000000000..4237ba44b66
--- /dev/null
+++ b/bgfx/effects/pillarbox_right_vertical/blit.json
@@ -0,0 +1,121 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// blit.json: A simple texture-to-target copy.
+//
+//============================================================
+{
+ // blend (required): The blend state for this effect.
+ "blend": {
+ // equation (optional): What equation to perform on the source and destination blend values.
+ // values: "add", "sub", "revSub", "min", "max"
+ // default: "add"
+ //
+ // "subtract" and "revSubtract" are provided as aliases for "sub" and "revSub"
+ "equation": "add",
+
+ // blend function parameters (optional): What factors to use in the blend function when calculating the final pixel.
+ // values: "0", "1", "srccolor", "1-srccolor", "dstcolor", "1-dstcolor", "srcalpha", "1-srcalpha", "dstalpha", "1-dstalpha"
+ // defaults (srcColor, srcAlpha): "1"
+ // defaults (dstColor, dstAlpha): "0"
+ //
+ // "zero", "one", "invsrccolor", "invdstcolor", "invsrcalpha", and "invdstalpha" are provided as aliases for "0", "1", "1-srccolor", "1-dstcolor", "1-srcalpha", and "1-dstalpha"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+
+ // depth (required): The depth state for this effect.
+ "depth": {
+ // function (optional): The depth function to use when drawing.
+ // values: "never", "less", "equal", "lequal", "greater", "notequal", "gequal", "always"
+ // default: "always"
+ "function": "always",
+
+ // writeenable (optional): Whether to store Z-buffer data.
+ // values: true, false
+ // default: false
+ "writeenable": false
+ },
+
+ // cull (required): The cull mode for this effect.
+ "cull": {
+ // mode (optional): What winding, if any, to cull.
+ // values: "none", "cw", "ccw"
+ // default: "ccw"
+ //
+ // "clockwise" and "counterclockwise" are provided as aliases for "cw" and "ccw"
+ "mode": "none"
+ },
+
+ // write (required): Write enable for color and alpha channels.
+ "write": {
+ // rgb (optional): Whether to store color data when drawing.
+ // values: true, false
+ // default: false
+ "rgb": true,
+
+ // alpha (optional): Whether to store alpha data when drawing.
+ // values: true, false
+ // default: false
+ "alpha": true
+ },
+
+ // vertex (required): The vertex shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "vertex": "chains/pillarbox_right_vertical/vs_blit",
+
+ // pixel/fragment (required): The pixel or fragment shader to use when drawing.
+ // value: A string containing the path and name of a shader file to use, minus the extension.
+ "fragment": "chains/pillarbox_right_vertical/fs_blit",
+
+ // uniforms (required): The list of uniforms for this effect. Can be empty, but must exist.
+ "uniforms": [
+ {
+ // name (required): The name of the uniform, as used in either the vertex or pixel/fragment shader.
+ // value: A string containing the name of the uniform as described above.
+ //
+ // NOTE: Some names correspond to special values that will be automatically filled by the BGFX
+ // code if they are used by the shader. These names are:
+ // "u_screen_dims"
+ // The dimensions of the first texture input if present, otherwise the dimensions of the output window.
+ // Valid values: xy
+ // "u_inv_screen_dims"
+ // The reciprocal of u_screen_dims.
+ // Valid values: xy
+ // "u_source_dims"
+ // The size, in pixels, of the screen texture incoming to the chain.
+ // Valid values: xy
+ // "u_rotation_type"
+ // This screen's rotation type. 0 if ROT0, 1 if ROT90, 2 if ROT180, 3 of ROT270.
+ // Valid values: x
+ // "u_swap_xy"
+ // Whether this screen is swapped on the X and Y axes. 1 if true, 0 if false.
+ // Valid values: x
+ // "u_quad_dims"
+ // The dimensions, in pixels, occupied by this one screen primitive itself in the output window.
+ // Valid values: xy
+ // "u_tex_sizeN"
+ // The dimensions, in pixels, of the texture in input pair N. Starts at 0.
+ // valid values: xy
+ "name": "s_tex",
+
+ // type (required): The type of the uniform.
+ // values: "int", "vec4", "mat3", "mat4"
+ //
+ // Note: "int" should only be used for samplers.
+ "type": "int",
+
+ // values (required): The array of numbers with which to initialize the uniform.
+ // value: A JSON array containin the correct amount of numbers to initialize a uniform of the
+ // above-specified type. The following size rules should be followed:
+ // "int": 1 float
+ // "vec4": 4 floats
+ // "mat3": 9 floats
+ // "mat4": 16 floats
+ "values": [ 1.0 ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_right_vertical/gaussian.json b/bgfx/effects/pillarbox_right_vertical/gaussian.json
new file mode 100644
index 00000000000..b96c5b521e9
--- /dev/null
+++ b/bgfx/effects/pillarbox_right_vertical/gaussian.json
@@ -0,0 +1,32 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// gaussian.json: Separable gaussian blur.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_right_vertical/vs_gaussian",
+ "fragment": "chains/pillarbox_right_vertical/fs_gaussian",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_dimension", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_radius", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/effects/pillarbox_right_vertical/saturation.json b/bgfx/effects/pillarbox_right_vertical/saturation.json
new file mode 100644
index 00000000000..f51e68f6134
--- /dev/null
+++ b/bgfx/effects/pillarbox_right_vertical/saturation.json
@@ -0,0 +1,30 @@
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+//============================================================
+//
+// saturation.json: Applies saturation to an image.
+//
+//============================================================
+{
+ "blend": {
+ "equation": "add",
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
+ },
+ "depth": {
+ "function": "always"
+ },
+ "cull": { "mode": "none" },
+ "write": {
+ "rgb": true,
+ "alpha": true
+ },
+ "vertex": "chains/pillarbox_right_vertical/vs_saturation",
+ "fragment": "chains/pillarbox_right_vertical/fs_saturation",
+ "uniforms": [
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_saturation", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }
+ ]
+} \ No newline at end of file
diff --git a/bgfx/layouts/sample/horizontal/default.lay b/bgfx/layouts/sample/horizontal/default.lay
new file mode 100644
index 00000000000..1554a9ec50b
--- /dev/null
+++ b/bgfx/layouts/sample/horizontal/default.lay
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+ <view name="Horizontal">
+ <screen index="0">
+ <bounds left="2" top="0" right="14" bottom="9" />
+ </screen>
+ <screen index="0">
+ <bounds left="0" top="0" right="2" bottom="9" />
+ </screen>
+ <screen index="0">
+ <bounds left="14" top="0" right="16" bottom="9" />
+ </screen>
+ </view>
+ <view name="Vertical">
+ <screen index="0">
+ <bounds left="18.5" top="0" right="45.5" bottom="36" />
+ </screen>
+ <screen index="0">
+ <bounds left="0" top="0" right="18.5" bottom="36" />
+ </screen>
+ <screen index="0">
+ <bounds left="45.5" top="0" right="64" bottom="36" />
+ </screen>
+ </view>
+</mamelayout> \ No newline at end of file
diff --git a/bgfx/layouts/sample/vertical/default.lay b/bgfx/layouts/sample/vertical/default.lay
new file mode 100644
index 00000000000..19105aa5929
--- /dev/null
+++ b/bgfx/layouts/sample/vertical/default.lay
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+ <view name="Horizontal">
+ <screen index="0">
+ <bounds left="0" top="0" right="2" bottom="9" />
+ </screen>
+ <screen index="0">
+ <bounds left="14" top="0" right="16" bottom="9" />
+ </screen>
+ <screen index="0">
+ <bounds left="2" top="0" right="14" bottom="9" />
+ </screen>
+ </view>
+ <view name="Vertical">
+ <screen index="0">
+ <bounds left="0" top="0" right="18.5" bottom="36" />
+ </screen>
+ <screen index="0">
+ <bounds left="45.5" top="0" right="64" bottom="36" />
+ </screen>
+ <screen index="0">
+ <bounds left="18.5" top="0" right="45.5" bottom="36" />
+ </screen>
+ </view>
+</mamelayout> \ No newline at end of file
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..80d85fb1107
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..753b0d31bff
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..eaec59b81d7
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..8b8f91d8417
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_blit.bin
new file mode 100644
index 00000000000..80d85fb1107
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..753b0d31bff
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..eaec59b81d7
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_blit.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..f7a1c40ba4d
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_left_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..80d85fb1107
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..753b0d31bff
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..eaec59b81d7
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..b57b9cd3633
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_blit.bin
new file mode 100644
index 00000000000..80d85fb1107
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..753b0d31bff
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..eaec59b81d7
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_blit.bin b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_blit.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_gaussian.bin b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..b0bebf9da4c
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_saturation.bin b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..7229773bd56
--- /dev/null
+++ b/bgfx/shaders/dx11/chains/pillarbox_right_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..ef8fa0730c3
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..222205d0983
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..5fe87a15fb5
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..bc748ecc4c2
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_blit.bin
new file mode 100644
index 00000000000..ef8fa0730c3
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..222205d0983
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..5fe87a15fb5
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_blit.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..d504cc35b51
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_left_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..ef8fa0730c3
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..222205d0983
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..5fe87a15fb5
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..628eff3b5ae
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_blit.bin
new file mode 100644
index 00000000000..ef8fa0730c3
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..222205d0983
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..5fe87a15fb5
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_blit.bin b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_blit.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_gaussian.bin b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..ea94c83e62d
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_saturation.bin b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..1abeb7f7aed
--- /dev/null
+++ b/bgfx/shaders/dx9/chains/pillarbox_right_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..22e2f0c23d0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..34b997772e7
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..2f6160fe747
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..e17074932b6
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_blit.bin
new file mode 100644
index 00000000000..22e2f0c23d0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..34b997772e7
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..2f6160fe747
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_blit.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..5f5ba0d6aac
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_left_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..22e2f0c23d0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..34b997772e7
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..2f6160fe747
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..20b51375de0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_blit.bin
new file mode 100644
index 00000000000..22e2f0c23d0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..34b997772e7
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..2f6160fe747
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_blit.bin b/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_blit.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_gaussian.bin b/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..9dd618de8a0
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_saturation.bin b/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..567cd53fd63
--- /dev/null
+++ b/bgfx/shaders/gles/chains/pillarbox_right_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..db0fe2b487b
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..eba13b8fcf5
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..4a3f80b56b9
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..6319f0af6f2
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_blit.bin
new file mode 100644
index 00000000000..db0fe2b487b
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..eba13b8fcf5
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..4a3f80b56b9
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_blit.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..0d8e84da2a0
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_left_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..db0fe2b487b
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..eba13b8fcf5
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..4a3f80b56b9
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..3c794ab6004
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_blit.bin
new file mode 100644
index 00000000000..db0fe2b487b
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..eba13b8fcf5
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..4a3f80b56b9
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_blit.bin b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_blit.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_gaussian.bin b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..af6c9349f41
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_saturation.bin b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..e0a84d1dba0
--- /dev/null
+++ b/bgfx/shaders/glsl/chains/pillarbox_right_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..6a3da392480
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..173ce9333e4
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..de6ec5972af
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..77a27dd0e00
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_blit.bin
new file mode 100644
index 00000000000..6a3da392480
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..173ce9333e4
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..de6ec5972af
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_blit.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..0b0b45bfd50
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_left_vertical/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_blit.bin
new file mode 100644
index 00000000000..6a3da392480
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_gaussian.bin
new file mode 100644
index 00000000000..173ce9333e4
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_saturation.bin
new file mode 100644
index 00000000000..de6ec5972af
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_blit.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_gaussian.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_saturation.bin
new file mode 100644
index 00000000000..beb3b436067
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_horizontal/vs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_blit.bin
new file mode 100644
index 00000000000..6a3da392480
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_gaussian.bin
new file mode 100644
index 00000000000..173ce9333e4
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_saturation.bin
new file mode 100644
index 00000000000..de6ec5972af
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_vertical/fs_saturation.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_blit.bin b/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_blit.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_blit.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_gaussian.bin b/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_gaussian.bin
new file mode 100644
index 00000000000..122b7dee5c3
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_gaussian.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_saturation.bin b/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_saturation.bin
new file mode 100644
index 00000000000..18d373c6e5c
--- /dev/null
+++ b/bgfx/shaders/metal/chains/pillarbox_right_vertical/vs_saturation.bin
Binary files differ
diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp
index e243748caac..2c8e08793b0 100644
--- a/src/osd/modules/render/bgfx/chainmanager.cpp
+++ b/src/osd/modules/render/bgfx/chainmanager.cpp
@@ -263,26 +263,12 @@ std::vector<render_primitive*> chain_manager::count_screens(render_primitive* pr
std::vector<render_primitive*> screens;
int screen_count = 0;
- std::vector<void*> bases;
while (prim != nullptr)
{
if (PRIMFLAG_GET_SCREENTEX(prim->flags))
{
- bool found = false;
- for (void* base : bases)
- {
- if (base == prim->texture.base)
- {
- found = true;
- break;
- }
- }
- if (!found)
- {
- screen_count++;
- screens.push_back(prim);
- bases.push_back(prim->texture.base);
- }
+ screen_count++;
+ screens.push_back(prim);
}
prim = prim->next();
}
@@ -435,7 +421,7 @@ std::vector<ui_menu_item> chain_manager::get_slider_list()
return sliders;
}
- for (size_t index = 0; index < m_screen_chains.size(); index++)
+ for (size_t index = 0; index < m_screen_chains.size() && index < m_screen_count; index++)
{
bgfx_chain* chain = m_screen_chains[index];
sliders.push_back(m_selection_sliders[index]);
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_blit.sc
new file mode 100644
index 00000000000..9af7bcf0ee6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_blit.sc
@@ -0,0 +1,14 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_gaussian.sc
new file mode 100644
index 00000000000..5375561e8ac
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_gaussian.sc
@@ -0,0 +1,57 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// Autos
+uniform vec4 u_tex_size0;
+
+// User-supplied
+uniform vec4 u_dimension;
+uniform vec4 u_radius;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+void main()
+{
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+
+ vec2 blur = (u_radius.xx * u_dimension.xy) / u_tex_size0.xy;
+
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(1.0, 1.0) * blur) * 0.096603;
+
+ vec4 d0 = texture2D(s_tex, v_texcoord0) * 0.099654;
+
+ sum += texture2D(s_tex, v_texcoord0 + vec2(1.0, 1.0) * blur) * 0.096603;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+
+ gl_FragColor = vec4(sum.rgb, 1.0);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_saturation.sc
new file mode 100644
index 00000000000..c14f61601c8
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/fs_saturation.sc
@@ -0,0 +1,25 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// User-supplied
+uniform vec4 u_saturation;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ vec4 base = texture2D(s_tex, v_texcoord0);
+ vec3 rgb = base.rgb;
+
+ vec3 gray = vec3(0.299, 0.587, 0.114);
+ float luma = dot(rgb, gray);
+ vec3 chroma = rgb - luma;
+ vec3 saturated = luma + chroma * u_saturation.x;
+
+ gl_FragColor = vec4(saturated, base.a);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/varying.def.sc
new file mode 100644
index 00000000000..2aa3cb425c0
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/varying.def.sc
@@ -0,0 +1,6 @@
+vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
+vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
+
+vec3 a_position : POSITION;
+vec4 a_color0 : COLOR0;
+vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_blit.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_blit.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_gaussian.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_gaussian.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_saturation.sc
new file mode 100644
index 00000000000..5ce10e25187
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_horizontal/vs_saturation.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0 * vec2(0.16666666 * 0.8, 1.0 * 0.8) + vec2(0.2, 0.1);
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_blit.sc
new file mode 100644
index 00000000000..9af7bcf0ee6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_blit.sc
@@ -0,0 +1,14 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_gaussian.sc
new file mode 100644
index 00000000000..5375561e8ac
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_gaussian.sc
@@ -0,0 +1,57 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// Autos
+uniform vec4 u_tex_size0;
+
+// User-supplied
+uniform vec4 u_dimension;
+uniform vec4 u_radius;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+void main()
+{
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+
+ vec2 blur = (u_radius.xx * u_dimension.xy) / u_tex_size0.xy;
+
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(1.0, 1.0) * blur) * 0.096603;
+
+ vec4 d0 = texture2D(s_tex, v_texcoord0) * 0.099654;
+
+ sum += texture2D(s_tex, v_texcoord0 + vec2(1.0, 1.0) * blur) * 0.096603;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+
+ gl_FragColor = vec4(sum.rgb, 1.0);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_saturation.sc
new file mode 100644
index 00000000000..c14f61601c8
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/fs_saturation.sc
@@ -0,0 +1,25 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// User-supplied
+uniform vec4 u_saturation;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ vec4 base = texture2D(s_tex, v_texcoord0);
+ vec3 rgb = base.rgb;
+
+ vec3 gray = vec3(0.299, 0.587, 0.114);
+ float luma = dot(rgb, gray);
+ vec3 chroma = rgb - luma;
+ vec3 saturated = luma + chroma * u_saturation.x;
+
+ gl_FragColor = vec4(saturated, base.a);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/varying.def.sc
new file mode 100644
index 00000000000..2aa3cb425c0
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/varying.def.sc
@@ -0,0 +1,6 @@
+vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
+vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
+
+vec3 a_position : POSITION;
+vec4 a_color0 : COLOR0;
+vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_blit.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_blit.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_gaussian.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_gaussian.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_saturation.sc
new file mode 100644
index 00000000000..3305b07810b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_left_vertical/vs_saturation.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0 * vec2(1.0 * 0.8, 0.740740 * 0.8) + vec2(0.1, 0.25926);
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_blit.sc
new file mode 100644
index 00000000000..9af7bcf0ee6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_blit.sc
@@ -0,0 +1,14 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_gaussian.sc
new file mode 100644
index 00000000000..5375561e8ac
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_gaussian.sc
@@ -0,0 +1,57 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// Autos
+uniform vec4 u_tex_size0;
+
+// User-supplied
+uniform vec4 u_dimension;
+uniform vec4 u_radius;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+void main()
+{
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+
+ vec2 blur = (u_radius.xx * u_dimension.xy) / u_tex_size0.xy;
+
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(1.0, 1.0) * blur) * 0.096603;
+
+ vec4 d0 = texture2D(s_tex, v_texcoord0) * 0.099654;
+
+ sum += texture2D(s_tex, v_texcoord0 + vec2(1.0, 1.0) * blur) * 0.096603;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+
+ gl_FragColor = vec4(sum.rgb, 1.0);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_saturation.sc
new file mode 100644
index 00000000000..c14f61601c8
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/fs_saturation.sc
@@ -0,0 +1,25 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// User-supplied
+uniform vec4 u_saturation;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ vec4 base = texture2D(s_tex, v_texcoord0);
+ vec3 rgb = base.rgb;
+
+ vec3 gray = vec3(0.299, 0.587, 0.114);
+ float luma = dot(rgb, gray);
+ vec3 chroma = rgb - luma;
+ vec3 saturated = luma + chroma * u_saturation.x;
+
+ gl_FragColor = vec4(saturated, base.a);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/varying.def.sc
new file mode 100644
index 00000000000..2aa3cb425c0
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/varying.def.sc
@@ -0,0 +1,6 @@
+vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
+vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
+
+vec3 a_position : POSITION;
+vec4 a_color0 : COLOR0;
+vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_blit.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_blit.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_gaussian.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_gaussian.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_saturation.sc
new file mode 100644
index 00000000000..f142ef653b7
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_horizontal/vs_saturation.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0 * vec2(0.16666666 * 0.8, 1.0 * 0.8) + vec2(1.0 - 0.3333333333, 0.1);
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_blit.sc
new file mode 100644
index 00000000000..9af7bcf0ee6
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_blit.sc
@@ -0,0 +1,14 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_gaussian.sc
new file mode 100644
index 00000000000..5375561e8ac
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_gaussian.sc
@@ -0,0 +1,57 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// Autos
+uniform vec4 u_tex_size0;
+
+// User-supplied
+uniform vec4 u_dimension;
+uniform vec4 u_radius;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+void main()
+{
+ vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
+
+ vec2 blur = (u_radius.xx * u_dimension.xy) / u_tex_size0.xy;
+
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(1.0, 1.0) * blur) * 0.096603;
+
+ vec4 d0 = texture2D(s_tex, v_texcoord0) * 0.099654;
+
+ sum += texture2D(s_tex, v_texcoord0 + vec2(1.0, 1.0) * blur) * 0.096603;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(2.0, 2.0) * blur) * 0.088001;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(3.0, 3.0) * blur) * 0.075333;
+ sum += texture2D(s_tex, v_texcoord0 + vec2(4.0, 4.0) * blur) * 0.0606;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(5.0, 5.0) * blur) * 0.04581;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(6.0, 6.0) * blur) * 0.032542;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(7.0, 7.0) * blur) * 0.021724;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(8.0, 8.0) * blur) * 0.013627;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(9.0, 9.0) * blur) * 0.008033;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(10.0, 10.0) * blur) * 0.00445;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(11.0, 11.0) * blur) * 0.002316;
+ sum += texture2D(s_tex, v_texcoord0 - vec2(12.0, 12.0) * blur) * 0.001133;
+
+ gl_FragColor = vec4(sum.rgb, 1.0);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_saturation.sc
new file mode 100644
index 00000000000..c14f61601c8
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/fs_saturation.sc
@@ -0,0 +1,25 @@
+$input v_color0, v_texcoord0
+
+// license:BSD-3-Clause
+// copyright-holders:Ryan Holtz
+
+#include "common.sh"
+
+// User-supplied
+uniform vec4 u_saturation;
+
+// Samplers
+SAMPLER2D(s_tex, 0);
+
+void main()
+{
+ vec4 base = texture2D(s_tex, v_texcoord0);
+ vec3 rgb = base.rgb;
+
+ vec3 gray = vec3(0.299, 0.587, 0.114);
+ float luma = dot(rgb, gray);
+ vec3 chroma = rgb - luma;
+ vec3 saturated = luma + chroma * u_saturation.x;
+
+ gl_FragColor = vec4(saturated, base.a);
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/varying.def.sc
new file mode 100644
index 00000000000..2aa3cb425c0
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/varying.def.sc
@@ -0,0 +1,6 @@
+vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
+vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
+
+vec3 a_position : POSITION;
+vec4 a_color0 : COLOR0;
+vec2 a_texcoord0 : TEXCOORD0;
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_blit.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_blit.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_gaussian.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_gaussian.sc
new file mode 100644
index 00000000000..405ef8feb3b
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_gaussian.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0;
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_saturation.sc b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_saturation.sc
new file mode 100644
index 00000000000..ea4d47d9963
--- /dev/null
+++ b/src/osd/modules/render/bgfx/shaders/chains/pillarbox_right_vertical/vs_saturation.sc
@@ -0,0 +1,14 @@
+$input a_position, a_texcoord0, a_color0
+$output v_texcoord0, v_color0
+
+// license:BSD-3-Clause
+// copyright-holders:Dario Manesku
+
+#include "common.sh"
+
+void main()
+{
+ gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0));
+ v_texcoord0 = a_texcoord0 * vec2(1.0 * 0.8, 0.740740 * 0.8) + vec2(0.1, 0.055555);
+ v_color0 = a_color0;
+}
diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp
index 32f45515a08..78d661a9953 100644
--- a/src/osd/modules/render/drawbgfx.cpp
+++ b/src/osd/modules/render/drawbgfx.cpp
@@ -20,6 +20,7 @@
#include "emu.h"
#include "window.h"
#include "rendutil.h"
+#include "aviio.h"
#include <bgfx/bgfxplatform.h>
#include <bgfx/bgfx.h>
@@ -73,6 +74,35 @@ bool renderer_bgfx::s_window_set = false;
uint32_t renderer_bgfx::s_current_view = 0;
//============================================================
+// renderer_bgfx - constructor
+//============================================================
+
+renderer_bgfx::renderer_bgfx(osd_window *w)
+ : osd_renderer(w, FLAG_NONE)
+ , m_options(downcast<osd_options &>(w->machine().options()))
+ , m_dimensions(0, 0)
+ , m_max_view(0)
+ , m_avi_output_file(nullptr)
+ , m_avi_frame(0)
+{
+ m_options = downcast<osd_options &>(window().machine().options());
+}
+
+//============================================================
+// renderer_bgfx - destructor
+//============================================================
+
+renderer_bgfx::~renderer_bgfx()
+{
+ // Cleanup.
+ delete m_chains;
+ delete m_effects;
+ delete m_shaders;
+ delete m_textures;
+ delete m_targets;
+}
+
+//============================================================
// renderer_bgfx::create
//============================================================
@@ -103,8 +133,6 @@ static void* sdlNativeWindowHandle(SDL_Window* _window)
int renderer_bgfx::create()
{
// create renderer
-
- osd_options& options = downcast<osd_options &>(window().machine().options());
osd_dim wdim = window().get_size();
m_width[window().m_index] = wdim.width();
m_height[window().m_index] = wdim.height();
@@ -127,7 +155,7 @@ int renderer_bgfx::create()
#else
bgfx::sdlSetWindow(window().sdl_window());
#endif
- std::string backend(options.bgfx_backend());
+ std::string backend(m_options.bgfx_backend());
if (backend == "auto")
{
bgfx::init();
@@ -159,15 +187,15 @@ int renderer_bgfx::create()
}
bgfx::reset(m_width[window().m_index], m_height[window().m_index], video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
// Enable debug text.
- bgfx::setDebug(options.bgfx_debug() ? BGFX_DEBUG_STATS : BGFX_DEBUG_TEXT);
+ bgfx::setDebug(m_options.bgfx_debug() ? BGFX_DEBUG_STATS : BGFX_DEBUG_TEXT);
m_dimensions = osd_dim(m_width[0], m_height[0]);
}
m_textures = new texture_manager();
m_targets = new target_manager(*m_textures);
- m_shaders = new shader_manager(options);
- m_effects = new effect_manager(options, *m_shaders);
+ m_shaders = new shader_manager(m_options);
+ m_effects = new effect_manager(m_options, *m_shaders);
if (window().m_index != 0)
{
@@ -190,7 +218,7 @@ int renderer_bgfx::create()
m_screen_effect[2] = m_effects->effect("screen_multiply");
m_screen_effect[3] = m_effects->effect("screen_add");
- m_chains = new chain_manager(window().machine(), options, *m_textures, *m_targets, *m_effects, window().m_index, *this);
+ m_chains = new chain_manager(window().machine(), m_options, *m_textures, *m_targets, *m_effects, window().m_index, *this);
m_sliders_dirty = true;
uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT;
@@ -205,17 +233,29 @@ int renderer_bgfx::create()
}
//============================================================
-// destructor
+// renderer_bgfx::record
//============================================================
-renderer_bgfx::~renderer_bgfx()
+void renderer_bgfx::record()
+{
+ std::string filename("test.avi");//m_options.d3d_hlsl_write());
+
+ if (m_avi_output_file != nullptr)
+ {
+ end_avi_recording();
+ }
+ else if (filename[0] != 0)
+ {
+ begin_avi_recording(filename);
+ }
+}
+
+void renderer_bgfx::end_avi_recording()
+{
+}
+
+void renderer_bgfx::begin_avi_recording(std::string filename)
{
- // Cleanup.
- delete m_chains;
- delete m_effects;
- delete m_shaders;
- delete m_textures;
- delete m_targets;
}
void renderer_bgfx::exit()
@@ -715,14 +755,14 @@ int renderer_bgfx::draw(int update)
{
for (screen = 0; screen < sources.size(); screen++)
{
- if (sources[screen] == prim->texture.base)
+ if (sources[screen] == prim)
{
break;
}
}
if (screen == sources.size())
{
- sources.push_back(prim->texture.base);
+ sources.push_back(prim);
}
}
@@ -786,7 +826,7 @@ bool renderer_bgfx::update_dimensions()
#endif
bgfx::setViewFrameBuffer(s_current_view, m_framebuffer->target());
- bgfx::setViewClear(s_current_view, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, 0x000000ff, 1.0f, 0);
+ bgfx::setViewClear(s_current_view, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, 0x00000000, 1.0f, 0);
bgfx::touch(s_current_view);
bgfx::frame();
return true;
diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h
index d48bb5914e6..e96fd461cc1 100644
--- a/src/osd/modules/render/drawbgfx.h
+++ b/src/osd/modules/render/drawbgfx.h
@@ -13,6 +13,7 @@
#include "binpacker.h"
#include "bgfx/vertex.h"
#include "sliderdirtynotifier.h"
+#include "aviio.h"
class texture_manager;
class target_manager;
@@ -23,17 +24,13 @@ class bgfx_texture;
class bgfx_effect;
class bgfx_target;
class bgfx_chain;
+class osd_options;
/* sdl_info is the information about SDL for the current screen */
class renderer_bgfx : public osd_renderer, public slider_dirty_notifier
{
public:
- renderer_bgfx(osd_window *w)
- : osd_renderer(w, FLAG_NONE)
- , m_dimensions(0, 0)
- , m_max_view(0)
- {
- }
+ renderer_bgfx(osd_window *w);
virtual ~renderer_bgfx();
static bool init(running_machine &machine) { return false; }
@@ -49,7 +46,7 @@ public:
virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override;
#else
virtual void save() override { }
- virtual void record() override { }
+ virtual void record() override;
virtual void toggle_fsfx() override { }
#endif
@@ -63,8 +60,8 @@ public:
static const char* WINDOW_PREFIX;
private:
- void handle_screen_chains(render_primitive *starting_prim);
- bgfx_chain* screen_chain(int32_t screen);
+ void end_avi_recording();
+ void begin_avi_recording(std::string filename);
bool update_dimensions();
void setup_view(uint32_t view_index, bool screen);
@@ -98,6 +95,8 @@ private:
void process_atlas_packs(std::vector<std::vector<rectangle_packer::packed_rectangle>>& packed);
UINT32 get_texture_hash(render_primitive *prim);
+ osd_options& m_options;
+
bgfx_target* m_framebuffer;
bgfx_texture* m_texture_cache;
@@ -124,6 +123,11 @@ private:
int32_t m_ui_view;
uint32_t m_max_view;
+ // AVI
+ avi_file::ptr m_avi_output_file; // AVI file
+ int m_avi_frame; // AVI frame
+ attotime m_avi_frame_period; // AVI frame period
+
static const uint16_t CACHE_SIZE;
static const uint32_t PACKABLE_SIZE;
static const uint32_t WHITE_HASH;