From ea9e591a0c5d0e16a6d7fcfb4c5eb3e633977993 Mon Sep 17 00:00:00 2001 From: "therealmogminer@gmail.com" Date: Fri, 18 Mar 2016 03:21:34 +0100 Subject: [PATCH] Polishing up BGFX shader system, nw --- bgfx/chains/LICENSE | 27 ++ bgfx/chains/README.md | 5 + bgfx/chains/hlsl.json | 105 ++++---- bgfx/chains/test.json | 115 -------- bgfx/effects/LICENSE | 27 ++ bgfx/effects/README.md | 5 + bgfx/effects/bloom_scale.json | 23 -- bgfx/effects/color.json | 6 +- bgfx/effects/deconverge.json | 12 +- bgfx/effects/defocus.json | 8 +- bgfx/effects/distortion.json | 14 +- bgfx/effects/ntsc_decode.json | 26 +- bgfx/effects/ntsc_encode.json | 18 +- bgfx/effects/post.json | 12 +- bgfx/effects/ratios.json | 26 -- bgfx/effects/tint.json | 25 -- bgfx/shaders/dx11/fs_blit.bin | Bin 40856 -> 40856 bytes bgfx/shaders/dx11/fs_color.bin | Bin 43259 -> 43257 bytes bgfx/shaders/dx11/fs_deconverge.bin | Bin 41062 -> 41060 bytes bgfx/shaders/dx11/fs_defocus.bin | Bin 47854 -> 45804 bytes bgfx/shaders/dx11/fs_distortion.bin | Bin 56047 -> 56045 bytes bgfx/shaders/dx11/fs_gui.bin | Bin 40856 -> 40856 bytes bgfx/shaders/dx11/fs_ntsc_decode.bin | Bin 58921 -> 58919 bytes bgfx/shaders/dx11/fs_ntsc_encode.bin | Bin 48333 -> 48331 bytes bgfx/shaders/dx11/fs_phosphor.bin | Bin 41094 -> 41094 bytes bgfx/shaders/dx11/fs_post.bin | Bin 57905 -> 55640 bytes bgfx/shaders/dx11/fs_ratios.bin | Bin 41118 -> 41118 bytes bgfx/shaders/dx11/fs_screen.bin | Bin 40856 -> 40856 bytes bgfx/shaders/dx11/fs_tint.bin | Bin 41011 -> 41011 bytes bgfx/shaders/dx11/vs_blit.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_color.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_deconverge.bin | Bin 43891 -> 43788 bytes bgfx/shaders/dx11/vs_defocus.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_distortion.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_gui.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_ntsc_decode.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_ntsc_encode.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_phosphor.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_post.bin | Bin 41216 -> 41216 bytes bgfx/shaders/dx11/vs_ratios.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_screen.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx11/vs_tint.bin | Bin 38987 -> 38987 bytes bgfx/shaders/dx9/fs_color.bin | Bin 1483 -> 1466 bytes bgfx/shaders/dx9/fs_deconverge.bin | Bin 1026 -> 1009 bytes bgfx/shaders/dx9/fs_defocus.bin | Bin 1822 -> 1805 bytes bgfx/shaders/dx9/fs_distortion.bin | Bin 4891 -> 4874 bytes bgfx/shaders/dx9/fs_gui.bin | Bin 645 -> 605 bytes bgfx/shaders/dx9/fs_ntsc_decode.bin | Bin 7473 -> 7456 bytes bgfx/shaders/dx9/fs_ntsc_encode.bin | Bin 3537 -> 3520 bytes bgfx/shaders/dx9/fs_post.bin | Bin 5172 -> 4637 bytes bgfx/shaders/dx9/vs_deconverge.bin | Bin 2010 -> 1791 bytes bgfx/shaders/gles/fs_color.bin | Bin 976 -> 949 bytes bgfx/shaders/gles/fs_deconverge.bin | Bin 469 -> 424 bytes bgfx/shaders/gles/fs_defocus.bin | Bin 1156 -> 1057 bytes bgfx/shaders/gles/fs_distortion.bin | Bin 3931 -> 3904 bytes bgfx/shaders/gles/fs_ntsc_decode.bin | Bin 6676 -> 6640 bytes bgfx/shaders/gles/fs_ntsc_encode.bin | Bin 2879 -> 2825 bytes bgfx/shaders/gles/fs_post.bin | Bin 4396 -> 3712 bytes bgfx/shaders/gles/vs_deconverge.bin | Bin 1608 -> 1409 bytes bgfx/shaders/glsl/fs_color.bin | Bin 909 -> 882 bytes bgfx/shaders/glsl/fs_deconverge.bin | Bin 440 -> 395 bytes bgfx/shaders/glsl/fs_defocus.bin | Bin 1121 -> 1022 bytes bgfx/shaders/glsl/fs_distortion.bin | Bin 3752 -> 3725 bytes bgfx/shaders/glsl/fs_ntsc_decode.bin | Bin 6318 -> 6282 bytes bgfx/shaders/glsl/fs_ntsc_encode.bin | Bin 2730 -> 2676 bytes bgfx/shaders/glsl/fs_post.bin | Bin 4166 -> 3530 bytes bgfx/shaders/glsl/vs_deconverge.bin | Bin 1488 -> 1301 bytes bgfx/shaders/metal/fs_color.bin | Bin 1334 -> 1298 bytes bgfx/shaders/metal/fs_deconverge.bin | Bin 1069 -> 997 bytes bgfx/shaders/metal/fs_defocus.bin | Bin 2475 -> 2295 bytes bgfx/shaders/metal/fs_distortion.bin | Bin 4349 -> 4313 bytes bgfx/shaders/metal/fs_ntsc_decode.bin | Bin 7152 -> 7098 bytes bgfx/shaders/metal/fs_ntsc_encode.bin | Bin 3415 -> 3325 bytes bgfx/shaders/metal/fs_post.bin | Bin 4828 -> 4172 bytes bgfx/shaders/metal/vs_deconverge.bin | Bin 1733 -> 1547 bytes src/osd/modules/lib/osdobj_common.cpp | 4 +- src/osd/modules/lib/osdobj_common.h | 6 +- src/osd/modules/render/bgfx/chain.cpp | 15 +- src/osd/modules/render/bgfx/chain.h | 3 +- src/osd/modules/render/bgfx/chainentry.cpp | 120 +++++---- src/osd/modules/render/bgfx/chainentry.h | 8 +- .../modules/render/bgfx/chainentryreader.cpp | 10 +- src/osd/modules/render/bgfx/chainreader.cpp | 21 +- src/osd/modules/render/bgfx/fs_blit.sc | 1 + src/osd/modules/render/bgfx/fs_color.sc | 25 +- src/osd/modules/render/bgfx/fs_deconverge.sc | 11 +- src/osd/modules/render/bgfx/fs_defocus.sc | 32 ++- src/osd/modules/render/bgfx/fs_distortion.sc | 50 ++-- src/osd/modules/render/bgfx/fs_gui.sc | 4 +- src/osd/modules/render/bgfx/fs_ntsc_decode.sc | 17 +- src/osd/modules/render/bgfx/fs_ntsc_encode.sc | 19 +- src/osd/modules/render/bgfx/fs_phosphor.sc | 2 + src/osd/modules/render/bgfx/fs_post.sc | 62 ++--- src/osd/modules/render/bgfx/fs_ratios.sc | 23 -- src/osd/modules/render/bgfx/fs_screen.sc | 1 + src/osd/modules/render/bgfx/fs_tint.sc | 17 -- src/osd/modules/render/bgfx/inputpair.cpp | 3 + src/osd/modules/render/bgfx/slider.cpp | 17 +- src/osd/modules/render/bgfx/slider.h | 7 +- src/osd/modules/render/bgfx/suppressor.cpp | 2 +- src/osd/modules/render/bgfx/target.cpp | 12 +- src/osd/modules/render/bgfx/target.h | 9 +- src/osd/modules/render/bgfx/targetmanager.cpp | 8 +- src/osd/modules/render/bgfx/targetmanager.h | 2 +- .../modules/render/bgfx/texturemanager.cpp | 33 ++- src/osd/modules/render/bgfx/texturemanager.h | 1 + src/osd/modules/render/bgfx/vs_deconverge.sc | 23 +- src/osd/modules/render/bgfx/vs_ratios.sc | 14 - src/osd/modules/render/bgfx/vs_tint.sc | 14 - src/osd/modules/render/copyutil.h | 167 ++++++++++++ src/osd/modules/render/drawbgfx.cpp | 253 ++++-------------- src/osd/modules/render/drawbgfx.h | 2 +- 112 files changed, 671 insertions(+), 801 deletions(-) create mode 100644 bgfx/chains/LICENSE create mode 100644 bgfx/chains/README.md delete mode 100644 bgfx/chains/test.json create mode 100644 bgfx/effects/LICENSE create mode 100644 bgfx/effects/README.md delete mode 100644 bgfx/effects/bloom_scale.json delete mode 100644 bgfx/effects/ratios.json delete mode 100644 bgfx/effects/tint.json delete mode 100644 src/osd/modules/render/bgfx/fs_ratios.sc delete mode 100644 src/osd/modules/render/bgfx/fs_tint.sc delete mode 100644 src/osd/modules/render/bgfx/vs_ratios.sc delete mode 100644 src/osd/modules/render/bgfx/vs_tint.sc create mode 100644 src/osd/modules/render/copyutil.h diff --git a/bgfx/chains/LICENSE b/bgfx/chains/LICENSE new file mode 100644 index 00000000000..e1a4f1f53d6 --- /dev/null +++ b/bgfx/chains/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2016, Ryan Holtz and MAME Development Team +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of bsd3 nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bgfx/chains/README.md b/bgfx/chains/README.md new file mode 100644 index 00000000000..2b165723286 --- /dev/null +++ b/bgfx/chains/README.md @@ -0,0 +1,5 @@ +# **Tests** # + +Cointains definitions for BGFX shader chains + +Licensed under [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause) by Ryan Holtz and MAME Development Team diff --git a/bgfx/chains/hlsl.json b/bgfx/chains/hlsl.json index 935833750de..3672cbd9b4a 100644 --- a/bgfx/chains/hlsl.json +++ b/bgfx/chains/hlsl.json @@ -19,42 +19,41 @@ { "type": "color", "name": "grn_ratios", "text": "Green Output from ", "default": [ 0, 100, 0 ], "max": [ 200, 200, 200 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }, { "type": "color", "name": "blu_ratios", "text": "Blue Output from ", "default": [ 0, 0, 100 ], "max": [ 200, 200, 200 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }, { "type": "color", "name": "offset", "text": "Signal Offset, ", "default": [ 0, 0, 0 ], "max": [ 200, 200, 200 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }, - { "type": "color", "name": "scale", "text": "Signal Scale, ", "default": [ 100, 100, 100 ], "max": [ 200, 200, 200 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }, - { "type": "float", "name": "saturation", "text": "Color Saturation", "default": 100, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }, + { "type": "color", "name": "scale", "text": "Signal Scale, ", "default": [ 95, 95, 95 ], "max": [ 200, 200, 200 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }, + { "type": "float", "name": "saturation", "text": "Color Saturation", "default": 150, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "raster" }, - { "type": "vec2", "name": "converge_red", "text": "Red Convergence, ", "default": [ 0, 0 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, - { "type": "vec2", "name": "converge_green", "text": "Green Convergence, ", "default": [ 0, 0 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, + { "type": "vec2", "name": "converge_red", "text": "Red Convergence, ", "default": [ 5, 0 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, + { "type": "vec2", "name": "converge_green", "text": "Green Convergence, ", "default": [ 0, 5 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, { "type": "vec2", "name": "converge_blue", "text": "Blue Convergence, ", "default": [ 0, 0 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, { "type": "vec2", "name": "radial_converge_red", "text": "Red Radial Convergence, ", "default": [ 0, 0 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, { "type": "vec2", "name": "radial_converge_green", "text": "Green Radial Convergence, ", "default": [ 0, 0 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, { "type": "vec2", "name": "radial_converge_blue", "text": "Blue Radial Convergence, ", "default": [ 0, 0 ], "max": [ 8000, 6000 ], "min": [ -8000, -6000 ], "step": 1, "scale": 0.1, "format": "%3.1f", "screen": "raster" }, - { "type": "vec2", "name": "defocus", "text": "Defocus, ", "default": [ 0, 0 ], "max": [ 500, 500 ], "min": [ 0, 0 ], "step": 1, "scale": 0.1, "format": "%2.1f", "screen": "crt" }, + { "type": "vec2", "name": "defocus", "text": "Defocus, ", "default": [ 5, 5 ], "max": [ 500, 500 ], "min": [ 0, 0 ], "step": 1, "scale": 0.1, "format": "%2.1f", "screen": "crt" }, - { "type": "color", "name": "phosphor", "text": "Phosphor Persistence, ", "default": [ 0, 0, 0 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "color", "name": "phosphor", "text": "Phosphor Persistence, ", "default": [ 45, 45, 45 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "scanline_alpha", "text": "Scanline Amount", "default": 0, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "scanline_alpha", "text": "Scanline Amount", "default": 100, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_scale", "text": "Overall Scanline Scale", "default": 100, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "scanline_bright_scale", "text": "Scanline Brightness Scale", "default": 100, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "scanline_bright_scale", "text": "Scanline Brightness Scale", "default": 200, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_bright_offset", "text": "Scanline Brightness Offset", "default": 0, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_jitter_amount", "text": "Scanline Jitter Amount", "default": 0, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "scanline_height", "text": "Individual Scanline Scale", "default": 100, "max": 400, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "shadow_alpha", "text": "Shadow Mask Amount", "default": 0, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "vec2", "name": "shadow_count", "text": "Shadow Mask Pixel Count ", "default": [ 60, 40 ], "max": [ 400, 400 ], "min": [ 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "vec2", "name": "shadow_uv_size", "text": "Shadow Mask UV Size ", "default": [ 48, 64 ], "max": [ 256, 256 ], "min": [ 0, 0 ], "step": 1, "scale": 0.00390625, "format": "%1.7f", "screen": "crt" }, - { "type": "vec2", "name": "shadow_uv_offset", "text": "Shadow Mask UV Offset ", "default": [ 0, 0 ], "max": [ 256, 256 ], "min": [ 0, 0 ], "step": 1, "scale": 0.00390625, "format": "%1.7f", "screen": "crt" }, + { "type": "vec2", "name": "shadow_uv_size", "text": "Shadow Mask UV Size ", "default": [ 250, 333 ], "max": [ 1000, 1000 ], "min": [ 0, 0 ], "step": 1, "scale": 0.001, "format": "%1.4f", "screen": "crt" }, + { "type": "vec2", "name": "shadow_uv_offset", "text": "Shadow Mask UV Offset ", "default": [ 0, 0 ], "max": [ 1000, 1000 ], "min": [ 0, 0 ], "step": 1, "scale": 0.001, "format": "%1.4f", "screen": "crt" }, { "type": "int_enum", "name": "shadow_tile_mode", "text": "Shadow Mask Tile Mode", "default": 0, "max": 1, "min": 0, "step": 1, "scale": 1.0, "format": "%s", "screen": "crt", "strings": [ "Screen", "Source" ] }, - { "type": "float", "name": "humbar_alpha", "text": "Hum Bar Amount", "default": 0, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "humbar_alpha", "text": "Hum Bar Amount", "default": 5, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, { "type": "float", "name": "humbar_hertz_rate", "text": "Hum Bar Frequency", "default": 100, "max": 10000, "min": 0, "step": 1, "scale": 0.00001, "format": "%1.7f", "screen": "crt" }, - { "type": "color", "name": "floor", "text": "Signal Floor, ", "default": [ 0, 0, 0 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "color", "name": "power", "text": "Signal Exponent, ", "default": [ 100, 100, 100 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "color", "name": "floor", "text": "Signal Floor, ", "default": [ 5, 5, 5 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "color", "name": "power", "text": "Signal Exponent, ", "default": [ 80, 80, 80 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "curvature", "text": "Screen Curvature Amount", "default": 0, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "round_corner", "text": "Rounded Corner Amount", "default": 0, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "smooth_border", "text": "Smooth Border Amount", "default": 0, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "vignetting", "text": "Vignetting Amount", "default": 0, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, - { "type": "float", "name": "reflection", "text": "Reflection Amount", "default": 0, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" } + { "type": "float", "name": "curvature", "text": "Screen Curvature Amount", "default": 25, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "round_corner", "text": "Rounded Corner Amount", "default": 20, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "smooth_border", "text": "Smooth Border Amount", "default": 5, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "vignetting", "text": "Vignetting Amount", "default": 20, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" }, + { "type": "float", "name": "reflection", "text": "Reflection Amount", "default": 30, "max": 200, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "crt" } ], "parameters": [ { "name": "jitter", "type": "frame", "period": 2 }, @@ -64,22 +63,27 @@ { "name": "guest", "mode": "guest", - "prescale": 1, + "bilinear": false, + "prescale": false, "doublebuffer": true }, - { "name": "native", - "mode": "native", - "prescale": 1, + { "name": "internal", + "mode": "guest", + "prescale": true, "doublebuffer": true }, { "name": "previous", + "mode": "guest", + "prescale": true, + "doublebuffer": true + }, + { "name": "screen", "mode": "native", - "prescale": 1, "doublebuffer": true }, { "name": "bloom", - "mode": "native", - "prescale": 1, + "mode": "guest", + "prescale": true, "doublebuffer": true, "pyramid": true } @@ -101,7 +105,7 @@ { "uniform": "u_jitter_amount", "parameter": "jitter" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "screen" } + { "sampler": "s_tex", "texture": "screen" } ], "output": "guest" }, @@ -125,7 +129,7 @@ { "uniform": "u_jitter_amount", "parameter": "jitter" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "guest" } + { "sampler": "s_tex", "texture": "guest" } ], "output": "guest" }, @@ -154,7 +158,7 @@ { "uniform": "u_saturation", "slider": "saturation" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "guest" } + { "sampler": "s_tex", "texture": "guest" } ], "output": "guest" }, @@ -163,7 +167,7 @@ "input": [ { "sampler": "s_tex", "texture": "guest" } ], - "output": "native" + "output": "internal" }, { "effect": "deconverge", "name": "Deconvergence", @@ -185,9 +189,9 @@ { "uniform": "u_radial_converge_blue", "slider": "radial_converge_blue" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "native" } + { "sampler": "s_tex", "texture": "internal" } ], - "output": "native" + "output": "internal" }, { "effect": "defocus", "name": "Defocus Pass 1", @@ -199,9 +203,9 @@ { "uniform": "u_defocus", "slider": "defocus" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "native" } + { "sampler": "s_tex", "texture": "internal" } ], - "output": "native" + "output": "internal" }, { "effect": "defocus", "name": "Defocus Pass 2", @@ -213,9 +217,9 @@ { "uniform": "u_defocus", "slider": "defocus" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "native" } + { "sampler": "s_tex", "texture": "internal" } ], - "output": "native" + "output": "internal" }, { "effect": "phosphor", "name": "Phosphor Decay", @@ -228,10 +232,10 @@ { "uniform": "u_phosphor", "slider": "phosphor" } ], "input": [ - { "sampler": "s_tex", "texture": "native" }, + { "sampler": "s_tex", "texture": "internal" }, { "sampler": "s_prev", "texture": "previous" } ], - "output": "native" + "output": "internal" }, { "effect": "phosphor", "name": "Phosphor Store", @@ -244,8 +248,8 @@ { "uniform": "u_phosphor", "slider": "phosphor" } ], "input": [ - { "sampler": "s_tex", "texture": "native" }, - { "sampler": "s_prev", "texture": "native" } + { "sampler": "s_tex", "texture": "internal" }, + { "sampler": "s_prev", "texture": "internal" } ], "output": "previous" }, @@ -259,14 +263,12 @@ { "type": "slider", "condition": "equal", "combine": "and", "name": "floor", "value": [ 0, 0, 0 ] }, { "type": "slider", "condition": "equal", "combine": "and", "name": "power", "value": [ 0, 0, 0 ] } ], - "textures": [ { "name": "shadow" } ], "uniforms": [ { "uniform": "u_scanline_alpha", "slider": "scanline_alpha" }, { "uniform": "u_scanline_scale", "slider": "scanline_scale" }, { "uniform": "u_scanline_bright_scale", "slider": "scanline_bright_scale" }, { "uniform": "u_scanline_bright_offset", "slider": "scanline_bright_offset" }, { "uniform": "u_shadow_alpha", "slider": "shadow_alpha" }, - { "uniform": "u_shadow_count", "slider": "shadow_count" }, { "uniform": "u_shadow_uv", "slider": "shadow_uv_size" }, { "uniform": "u_shadow_uv_offset", "slider": "shadow_uv_offset" }, { "uniform": "u_shadow_tile_mode", "slider": "shadow_tile_mode" }, @@ -279,10 +281,10 @@ { "uniform": "u_time", "parameter": "time" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "native" }, - { "sampler": "ShadowSampler", "texture": "shadow" } + { "sampler": "s_tex", "texture": "internal" }, + { "sampler": "s_shadow", "texture": "shadow" } ], - "output": "native" + "output": "internal" }, { "effect": "distortion", "name": "Distortion Pass", @@ -302,10 +304,17 @@ { "uniform": "u_reflection", "slider": "reflection" } ], "input": [ - { "sampler": "DiffuseSampler", "texture": "native" } + { "sampler": "s_tex", "texture": "internal" } ], - "output": "native" + "output": "internal" + }, + { "effect": "blit", + "name": "Final Downscale", + "input": [ + { "sampler": "s_tex", "texture": "internal" } + ], + "output": "screen" } ], - "output": "native" + "output": "screen" } \ No newline at end of file diff --git a/bgfx/chains/test.json b/bgfx/chains/test.json deleted file mode 100644 index f698ff6cf54..00000000000 --- a/bgfx/chains/test.json +++ /dev/null @@ -1,115 +0,0 @@ -{ "name": "Test Shader Chain", - "author": "Ryan Holtz", - "sliders": [ - { "type": "int_enum", "name": "adjustments", "text": "Enable Adjustments", "default": 0, "max": 1, "min": 0, "step": 1, "scale": 1.0, "format": "%s", "screen": "any", "strings": [ "Off", "On" ] }, - { "type": "float", "name": "ratio_amount", "text": "Ratio Amount", "default": 0, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "any" }, - { "type": "color", "name": "red_ratios", "text": "Color Matrix, Red from ", "default": [ 200, 0, 0 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" }, - { "type": "color", "name": "grn_ratios", "text": "Color Matrix, Green from ", "default": [ 0, 200, 0 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" }, - { "type": "color", "name": "blu_ratios", "text": "Color Matrix, Blue from ", "default": [ 0, 0, 200 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" }, - { "type": "color", "name": "tint", "text": "Tint ", "default": [ 100, 100, 100 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "any" }, - { "type": "color", "name": "phosphor", "text": "Phosphor Life, ", "default": [ 0, 0, 0 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "any" }, - { "type": "vec2", "name": "shift", "text": "Frame Shift ", "default": [ 0, 0 ], "max": [ 25, 25 ], "min": [ -25, -25 ], "step": 1, "scale": 1.0, "format": "%2.f", "screen": "raster" } - ], - "parameters": [ - { "name": "alternating", "type": "frame", "period": 2 } - ], - "targets": [ - { "name": "native", - "mode": "native", - "prescale": 1, - "doublebuffer": true - }, - { "name": "previous", - "mode": "native", - "prescale": 1, - "doublebuffer": true - } - ], - "passes": [ - { "effect": "ratios", - "name": "Matrix Pass", - "disablewhen": [ - { "type": "slider", "condition": "equal", "name": "adjustments", "value": 0 }, - { "type": "slider", "condition": "equal", "name": "ratio_amount", "value": 0 } - ], - "uniforms": [ - { "uniform": "u_ratio_amount", "slider": "ratio_amount" }, - { "uniform": "u_red_ratios", "slider": "red_ratios" }, - { "uniform": "u_grn_ratios", "slider": "grn_ratios" }, - { "uniform": "u_blu_ratios", "slider": "blu_ratios" } - ], - "input": [ - { "sampler": "s_tex", "texture": "screen" } - ], - "output": "native" - }, - { "effect": "blit", - "name": "Matrix Skip", - "disablewhen": [ - { "type": "slider", "condition": "equal", "name": "adjustments", "value": 0 }, - { "type": "slider", "condition": "notequal", "name": "ratio_amount", "value": 0 } - ], - "input": [ - { "sampler": "s_tex", "texture": "screen" } - ], - "output": "native" - }, - { "effect": "tint", - "name": "Tint Pass", - "disablewhen": [ - { "type": "slider", "condition": "equal", "name": "adjustments", "value": 0 } - ], - "uniforms": [ - { "uniform": "u_tint", "slider": "tint" }, - { "uniform": "u_shift", "slider": "shift" } - ], - "input": [ - { "sampler": "s_tex", "texture": "native" } - ], - "output": "native" - }, - { "effect": "phosphor", - "name": "Phosphor Decay", - "disablewhen": [ - { "type": "slider", "condition": "equal", "name": "adjustments", "value": 0 }, - { "type": "slider", "condition": "equal", "name": "phosphor", "value": [ 0, 0, 0 ] } - ], - "uniforms": [ - { "uniform": "u_passthrough", "value": [ 0 ] }, - { "uniform": "u_phosphor", "slider": "phosphor" } - ], - "input": [ - { "sampler": "s_tex", "texture": "native" }, - { "sampler": "s_prev", "texture": "previous" } - ], - "output": "native" - }, - { "effect": "phosphor", - "name": "Phosphor Store", - "disablewhen": [ - { "type": "slider", "condition": "equal", "name": "adjustments", "value": 0 }, - { "type": "slider", "condition": "equal", "name": "phosphor", "value": [ 0, 0, 0 ] } - ], - "uniforms": [ - { "uniform": "u_passthrough", "value": [ 1 ] }, - { "uniform": "u_phosphor", "slider": "phosphor" } - ], - "input": [ - { "sampler": "s_tex", "texture": "native" }, - { "sampler": "s_prev", "texture": "native" } - ], - "output": "previous" - }, - { "effect": "blit", - "name": "Total Skip", - "disablewhen": [ - { "type": "slider", "condition": "notequal", "name": "adjustments", "value": 0 } - ], - "input": [ - { "sampler": "s_tex", "texture": "screen" } - ], - "output": "native" - } - ], - "output": "native" -} \ No newline at end of file diff --git a/bgfx/effects/LICENSE b/bgfx/effects/LICENSE new file mode 100644 index 00000000000..e1a4f1f53d6 --- /dev/null +++ b/bgfx/effects/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2016, Ryan Holtz and MAME Development Team +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of bsd3 nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bgfx/effects/README.md b/bgfx/effects/README.md new file mode 100644 index 00000000000..2b165723286 --- /dev/null +++ b/bgfx/effects/README.md @@ -0,0 +1,5 @@ +# **Tests** # + +Cointains definitions for BGFX shader chains + +Licensed under [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause) by Ryan Holtz and MAME Development Team diff --git a/bgfx/effects/bloom_scale.json b/bgfx/effects/bloom_scale.json deleted file mode 100644 index 5ba081a5a19..00000000000 --- a/bgfx/effects/bloom_scale.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "blend": { - "equation": "add", - "srcColor": "1", - "dstColor": "0", - "srcAlpha": "1", - "dstAlpha": "0" - }, - "depth": { - "function": "always" - }, - "cull": { "mode": "none" }, - "write": { - "rgb": "true", - "alpha": "true" - }, - "vertex": "vs_bloom_scale", - "fragment": "fs_bloom_scale", - "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 1.0 ] }, - { "name": "u_source_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } - ] -} \ No newline at end of file diff --git a/bgfx/effects/color.json b/bgfx/effects/color.json index 41e38714e9c..df6448631ec 100644 --- a/bgfx/effects/color.json +++ b/bgfx/effects/color.json @@ -17,12 +17,12 @@ "vertex": "vs_color", "fragment": "fs_color", "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 1.0 ] }, + { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, { "name": "u_red_ratios", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, { "name": "u_grn_ratios", "type": "vec4", "values": [ 0.0, 1.0, 0.0, 0.0 ] }, { "name": "u_blu_ratios", "type": "vec4", "values": [ 0.0, 0.0, 1.0, 0.0 ] }, { "name": "u_offset", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_scale", "type": "vec4", "values": [ 1.0, 1.0, 1.0, 0.0 ] }, - { "name": "u_saturation", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] } + { "name": "u_scale", "type": "vec4", "values": [ 0.95, 0.95, 0.95, 0.0 ] }, + { "name": "u_saturation", "type": "vec4", "values": [ 1.5, 0.0, 0.0, 0.0 ] } ] } \ No newline at end of file diff --git a/bgfx/effects/deconverge.json b/bgfx/effects/deconverge.json index 69d67632497..8da0d5434b4 100644 --- a/bgfx/effects/deconverge.json +++ b/bgfx/effects/deconverge.json @@ -17,17 +17,13 @@ "vertex": "vs_deconverge", "fragment": "fs_deconverge", "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 1.0 ] }, - { "name": "u_texsize", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, - { "name": "u_screenrect", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, - { "name": "u_converge_red", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_converge_green", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, + { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, + { "name": "u_converge_red", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, + { "name": "u_converge_green", "type": "vec4", "values": [ 0.0, 0.5, 0.0, 0.0 ] }, { "name": "u_converge_blue", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_radial_converge_red", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_radial_converge_green", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_radial_converge_blue", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_swap_xy", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_quad_dims", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_guest_dims", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } + { "name": "u_source_dims", "type": "vec4", "values": [ 256.0, 256.0, 0.0, 0.0 ] } ] } \ No newline at end of file diff --git a/bgfx/effects/defocus.json b/bgfx/effects/defocus.json index ddf8abf1b62..364283f9f48 100644 --- a/bgfx/effects/defocus.json +++ b/bgfx/effects/defocus.json @@ -17,10 +17,8 @@ "vertex": "vs_defocus", "fragment": "fs_defocus", "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 1.0 ] }, - { "name": "u_screen_dims", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_swap_xy", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_quad_dims", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_defocus", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } + { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, + { "name": "u_screen_dims", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_defocus", "type": "vec4", "values": [ 0.5, 0.5, 0.0, 0.0 ] } ] } \ No newline at end of file diff --git a/bgfx/effects/distortion.json b/bgfx/effects/distortion.json index e8fcb4722c7..de216b397b2 100644 --- a/bgfx/effects/distortion.json +++ b/bgfx/effects/distortion.json @@ -17,13 +17,13 @@ "vertex": "vs_distortion", "fragment": "fs_distortion", "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 0.0 ] }, - { "name": "u_screen_dims", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_curvature", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_round_corner", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_smooth_border", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_vignetting", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_reflection", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, + { "name": "s_tex", "type": "int", "values": [ 0.0 ] }, + { "name": "u_screen_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_curvature", "type": "vec4", "values": [ 0.25, 0.0, 0.0, 0.0 ] }, + { "name": "u_round_corner", "type": "vec4", "values": [ 0.2, 0.0, 0.0, 0.0 ] }, + { "name": "u_smooth_border", "type": "vec4", "values": [ 0.05, 0.0, 0.0, 0.0 ] }, + { "name": "u_vignetting", "type": "vec4", "values": [ 0.20, 0.0, 0.0, 0.0 ] }, + { "name": "u_reflection", "type": "vec4", "values": [ 0.30, 0.0, 0.0, 0.0 ] }, { "name": "u_rotation_type", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } ] } \ No newline at end of file diff --git a/bgfx/effects/ntsc_decode.json b/bgfx/effects/ntsc_decode.json index 89e8288f8b2..0bf1963c85f 100644 --- a/bgfx/effects/ntsc_decode.json +++ b/bgfx/effects/ntsc_decode.json @@ -17,18 +17,18 @@ "vertex": "vs_ntsc_decode", "fragment": "fs_ntsc_decode", "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 1.0 ] }, - { "name": "u_source_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, - { "name": "u_a_value", "type": "vec4", "values": [ 0.5, 0.5, 0.5, 0.5 ] }, - { "name": "u_b_value", "type": "vec4", "values": [ 0.5, 0.5, 0.5, 0.5 ] }, - { "name": "u_cc_value", "type": "vec4", "values": [ 3.5795454, 3.5795454, 3.5795454, 3.5795454 ] }, - { "name": "u_o_value", "type": "vec4", "values": [ 1.570796325, 1.570796325, 1.570796325, 1.570796325 ] }, - { "name": "u_scan_time", "type": "vec4", "values": [ 52.6, 0.0, 0.0, 0.0 ] }, - { "name": "u_notch_width", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_y_freq_response", "type": "vec4", "values": [ 6.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_i_freq_response", "type": "vec4", "values": [ 1.2, 0.0, 0.0, 0.0 ] }, - { "name": "u_q_freq_response", "type": "vec4", "values": [ 0.6, 0.0, 0.0, 0.0 ] }, - { "name": "u_jitter_amount", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_jitter_offset", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } + { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, + { "name": "u_source_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_a_value", "type": "vec4", "values": [ 0.5, 0.5, 0.5, 0.5 ] }, + { "name": "u_b_value", "type": "vec4", "values": [ 0.5, 0.5, 0.5, 0.5 ] }, + { "name": "u_cc_value", "type": "vec4", "values": [ 3.5795454, 3.5795454, 3.5795454, 3.5795454 ] }, + { "name": "u_o_value", "type": "vec4", "values": [ 1.570796325, 1.570796325, 1.570796325, 1.570796325 ] }, + { "name": "u_scan_time", "type": "vec4", "values": [ 52.6, 0.0, 0.0, 0.0 ] }, + { "name": "u_notch_width", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_y_freq_response", "type": "vec4", "values": [ 6.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_i_freq_response", "type": "vec4", "values": [ 1.2, 0.0, 0.0, 0.0 ] }, + { "name": "u_q_freq_response", "type": "vec4", "values": [ 0.6, 0.0, 0.0, 0.0 ] }, + { "name": "u_jitter_amount", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_jitter_offset", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } ] } \ No newline at end of file diff --git a/bgfx/effects/ntsc_encode.json b/bgfx/effects/ntsc_encode.json index 9cee95af3c3..f635edad14c 100644 --- a/bgfx/effects/ntsc_encode.json +++ b/bgfx/effects/ntsc_encode.json @@ -17,14 +17,14 @@ "vertex": "vs_ntsc_encode", "fragment": "fs_ntsc_encode", "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 1.0 ] }, - { "name": "u_source_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, - { "name": "u_a_value", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, - { "name": "u_b_value", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, - { "name": "u_cc_value", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, - { "name": "u_p_value", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_scan_time", "type": "vec4", "values": [ 52.6, 0.0, 0.0, 0.0 ] }, - { "name": "u_jitter_amount", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_jitter_offset", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } + { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, + { "name": "u_source_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_a_value", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, + { "name": "u_b_value", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, + { "name": "u_cc_value", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, + { "name": "u_p_value", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_scan_time", "type": "vec4", "values": [ 52.6, 0.0, 0.0, 0.0 ] }, + { "name": "u_jitter_amount", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_jitter_offset", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } ] } \ No newline at end of file diff --git a/bgfx/effects/post.json b/bgfx/effects/post.json index f73e2a0be7c..21936db55d6 100644 --- a/bgfx/effects/post.json +++ b/bgfx/effects/post.json @@ -17,12 +17,11 @@ "vertex": "vs_post", "fragment": "fs_post", "uniforms": [ - { "name": "DiffuseSampler", "type": "int", "values": [ 0.0 ] }, - { "name": "ShadowSampler", "type": "int", "values": [ 1.0 ] }, + { "name": "s_tex", "type": "int", "values": [ 0.0 ] }, + { "name": "s_shadow", "type": "int", "values": [ 1.0 ] }, { "name": "u_swap_xy", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_screen_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, - { "name": "u_source_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, - { "name": "u_shadow_dims", "type": "vec4", "values": [ 32.0, 32.0, 0.0, 0.0 ] }, + { "name": "u_screen_dims", "type": "vec4", "values": [ 1336.0, 1002.0, 0.0, 0.0 ] }, + { "name": "u_source_dims", "type": "vec4", "values": [ 256.0, 256.0, 0.0, 0.0 ] }, { "name": "u_shadow_uv_offset", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_prepare_bloom", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_prepare_vector", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, @@ -41,8 +40,7 @@ { "name": "u_back_color", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_shadow_tile_mode", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_shadow_alpha", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, - { "name": "u_shadow_count", "type": "vec4", "values": [ 6.0, 4.0, 0.0, 0.0 ] }, - { "name": "u_shadow_uv", "type": "vec4", "values": [ 0.25, 0.25, 0.0, 0.0 ] }, + { "name": "u_shadow_uv", "type": "vec4", "values": [ 0.25, 0.333, 0.0, 0.0 ] }, { "name": "u_power", "type": "vec4", "values": [ 1.0, 1.0, 1.0, 0.0 ] }, { "name": "u_floor", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] } ] diff --git a/bgfx/effects/ratios.json b/bgfx/effects/ratios.json deleted file mode 100644 index 7b8af5c1875..00000000000 --- a/bgfx/effects/ratios.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "blend": { - "equation": "add", - "srcColor": "1", - "dstColor": "0", - "srcAlpha": "1", - "dstAlpha": "0" - }, - "depth": { - "function": "always" - }, - "cull": { "mode": "none" }, - "write": { - "rgb": "true", - "alpha": "true" - }, - "vertex": "vs_ratios", - "fragment": "fs_ratios", - "uniforms": [ - { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, - { "name": "u_red_ratios", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 1.0 ] }, - { "name": "u_grn_ratios", "type": "vec4", "values": [ 0.0, 1.0, 0.0, 1.0 ] }, - { "name": "u_blu_ratios", "type": "vec4", "values": [ 0.0, 0.0, 1.0, 1.0 ] }, - { "name": "u_ratio_amount", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] } - ] -} \ No newline at end of file diff --git a/bgfx/effects/tint.json b/bgfx/effects/tint.json deleted file mode 100644 index 9b022ebe993..00000000000 --- a/bgfx/effects/tint.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "blend": { - "equation": "add", - "srcColor": "1", - "dstColor": "0", - "srcAlpha": "1", - "dstAlpha": "0" - }, - "depth": { - "function": "always" - }, - "cull": { "mode": "none" }, - "write": { - "rgb": "true", - "alpha": "true" - }, - "vertex": "vs_tint", - "fragment": "fs_tint", - "uniforms": [ - { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, - { "name": "u_tint", "type": "vec4", "values": [ 1.0, 1.0, 1.0, 1.0 ] }, - { "name": "u_shift", "type": "vec4", "values": [ 0.1, 0.1, 0.0, 0.0 ] }, - { "name": "u_texsize", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } - ] -} \ No newline at end of file diff --git a/bgfx/shaders/dx11/fs_blit.bin b/bgfx/shaders/dx11/fs_blit.bin index 185d5a65b6aa63771229b38eb7cf8a5c52f6ff2e..ffaaa19095081bad6c188631b5c56ec75c5dedbb 100644 GIT binary patch delta 133 zcmbQSpJ~Q^rU^0v5BzqkFMh%qz>|LEQYYWyX&ZHNxFrtwzYb$$U|`s@qA1T$H^ism z{b_R@Gnu=aH*o)9W>)&Zym>wUTXW6@83JwV8!j?3PQJ*fzxj%L83&Vt$Y!5_eU3~V QOq+Qo^)TWwY4Qth0RHzhqyPW_ delta 133 zcmbQSpJ~Q^rU^0v_no#*`OADkM*FkvP0!w{sEs-~+!B_JFT)ra7#PZ0oc2m3N;xhu zV_UV7W$XRT8@T^4Gb_h2ZC=m+)||6v>a(k}>n}1gPQJ*fzxj%L83&WVqRl=5`y83- Q88-7w>S4rV(&QK100Uw)(*OVf diff --git a/bgfx/shaders/dx11/fs_color.bin b/bgfx/shaders/dx11/fs_color.bin index ce7cde86c964ff82f4dfe5a3e137650402a7e0a6..5cbf93eb345e8ce17e06f952828d19382de5f97b 100644 GIT binary patch delta 729 zcmex;k?H3}rU}JLti|yqsTBr{3=E76B`aJaoSdH@Hc!&IvQ=|QQd;}5DHc~ZPEX;H zIOzX645)_TO6li|C1wxR#Rc%gNk*ijyx-E&*x~njAT$6^Laf|C+LK^ZKbCj6gw_ z&EKazU{q9M2o&TOU|?Wl_zwmQKpHtf1%O_Z-Yh)x30P0P7F0PzF-!|c)Bpc$49FT8 z7(hk~0F7n`%R@JyUX{E)f28;|0j0`0!Tq2yD&3lYezAUOael~|=)#~4yWH(Mt z;gPUvd>IB*!@#=fQT1V&H1Dpnj|Adp3vOF1$jc(fk<7s0@QRUvOO=UX&U+>XM-@hf zD-28wirX0(x*l)V7o2Fq2el|TF}ENmwP^BDR~>YrZ?5_lsHzlf6{;0bg`oO%(1a%+ z=(>Ss-e!6C1lYh;Ubw*Z*kOdhj05p;vY$V7)R3lT1LQ*SAN{dp#=6KDPMT>;ZIkPhu zCx4w&!Xi;&%d|OnZVw}#v^<|lRluBqp#f-Et{DSE1TbWMfNUNh)&Sx&z|heF(hD}5 IEj-K)0INwL$N&HU diff --git a/bgfx/shaders/dx11/fs_deconverge.bin b/bgfx/shaders/dx11/fs_deconverge.bin index 3c6744c0def5149cacdf8d70dd3ec518ff5c8935..cfd2f01541b026c27665433b62657222833ed8ef 100644 GIT binary patch delta 725 zcmaEMfa%ErCLOn650<++*RL=#uolOcq*fR(GB7YQcr0*RIqe9Q1!322{f!ly6^{dYHw#;qVu^xuGH^o9lS~Ff$kYWZYaUAZ`LNY_e9n z4wQArMPC+dfr70%9`Z{V?}kkZ7aEWko4vTQu&S^65y+c{I z_L9|8syFIb@JLuSz6=AZVJLWf_UrDra_6bqp==ID7y38X@cdzB7A#=eTrD7O!Ur`j zI5D>%C$(s@e7g?1P(ZuB1*$3qTZL)`R3WH-9W>$1bJ_(N(GApc(?S<|*nuG=(CNPU zyqhQE$mai~=GyG~$$4Hutn9x!TDEOI>ZQpp@QBlcW%}cw zvmZE@br*c!lQH>U;1XGL25truU@*aGLk1xR0~mku{-9V+2Ve-50P%v&3z@8ec7^O? zy0CDwLg+6;bSDm`kcpqXz>9^o2Iy{<$qShlY)t69f5y!VCR}0E)nW(~uqNKDa6>QGSNwR1my_tKm3FGF3DJ4uS9EJ@Hn{Q0(VZ@o5 u7uU>SQcX5xU}ylEw#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l?M$_o`;#s-~l~Y^%t+ZvCKxXrFAC57--h4m|)c)!rMnC9-3Da!pNGFfRnO zgza3iV|}ux#@;M@>zgQrjTD_vZf^0`)XC4+*Lv&pu${C7pWG%p-Huk-?eMtPv^0At zxO%}+|F2^~cP;3xy>AGU|fdN@TYRr0j>+%*olw!X=u zhau7;OX{6YpU08QfGp!rB|EnieUhCOP*6ka!0sS`)l?OC+rOrzY<<~)$R>E&N4)jizkZ8%eymsv7+ zd4A-ht>-VFwx)=tL%RjA{YrP0DZpEE0u(*OU=jpKzrf)3EkUVTeSN+1+eL|C+OULI zK8(i3GBb`}OiV4aH@O-e?lQ04>oD_!;~H9rEvuGEuHi>FE|tuWo7 zdRaatzQP@`T$4s$(7s{67JYZ_?ws23n~G)cJ*M6LWMc4S2jpoY`x8K%A6oCP3_}(jn5v33ZPheHoBiPlIuM1gpmmyY0 zy4r+>0xGeG@FL+1;S<75f<(195_S^031j&0QN@6;Qe1#F<^ zRL-MjRqo;Z9QP-3R(&Dxcsu6-9$&$kaekj_sPPq?=gCm*0R|1B#V#%+aQ>7Rc!~1{ z&R_9_{b8HO_wdAPIe){shx<3FjC~VkbV*t!pmqE>_D?)WRs!Zun1~I;j}b>L+WixK ztPyQreuo);L;7lXCP60wL{Vjcd!gUrxFux`?(v)OlHb52oTZiGH(-3gfM5G#V#7lh zARBLz@7X{y%SBhfgvAtbI$&Tn{2*YW=X4+^Y5QXK`z9{{js?=OFqoWPz39Jh3ai7G zcCn6jDWP3T5-Z74tdrN6pp!5?n1Zhdjm(ATf)8VR(16#2MjQ;ruvV-JreS~->y(il z!=b4R%$XuTp=`>DPx(_YKt6^-;PH919Hnbt^fc4 diff --git a/bgfx/shaders/dx11/fs_ntsc_encode.bin b/bgfx/shaders/dx11/fs_ntsc_encode.bin index 6f4d2bcfe360cc80e3052c7ef19fa1914bc29574..05f2161a5394bea8336787845cd2dcd5c7bba90e 100644 GIT binary patch delta 1499 zcmc&!e@q)y9RI#+OLv7rhgTh>8wE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{phs4L+}mvciHyrk@7Qg|x-=kZZJr_JaR1B2(?CLdVTz z@aJ-|_t=RKs%@(hcg3_dQ83Bf_G#?4l|sn6IufMm;SwGvZ#q~W#%T*MKTqt>5a&K- z@p6%0O*=*xule^`+oupda@NOo$@kf)?@1WFde-OM=;FX!A2DnHEol7XO(+8eGo{Y2 zPyEU0$xImB+LhVL|MP2i>dGfl*%Nh)^<#s{%05DzX3Ot B=;;6e diff --git a/bgfx/shaders/dx11/fs_phosphor.bin b/bgfx/shaders/dx11/fs_phosphor.bin index bdc6523bb0dea16ede1d2f22717906aa00b3c912..1a9430af3ad8e41196c4162481bf22b8d3331183 100644 GIT binary patch delta 185 zcmZoW$kcX_X@Z|X?u@nDwK|#GxwjtRp25V!yD?6KN8*70>o7(J28KhTyPAJCsk(N4 zo5Zku=cy-)=kc&G_Z(oJyih=r>BHmAdj!r~vhIA)y1rra1g`^JObz0bgF>eo^j zP%t1jgv)F3JRTNi{xF8g3k4*Z+0YH-!7#I>57>dg$-Hq)$ diff --git a/bgfx/shaders/dx11/fs_post.bin b/bgfx/shaders/dx11/fs_post.bin index 9797487029f6befb0753330e36a8ad4ba4c55359..b0f7026a48b5e94968270976a9e3e9eb40bc8948 100644 GIT binary patch delta 7430 zcmeHMdvsOhmEY&SFS!XfmrDo%@PVH z{b&B3leP0Z`|<6)zi)q!bIyJGW&gRK`lr^ezcsLK<#$$>P&CuDV^>R8)9yV9B66rO zb1-#H!;a0}>2ya^=awxy(me^Pf?|B8sjEBP)zY1A+SJzB*`Aqs}Xv~_K5Nl^2_7fXU&&`o-@Zc;cwIoy`=2Lq)Y2|9rLVkBal+_$Z# zCkUjAGt(i%0cmhYQ%`z# zm4nt4*`fJ}!lC`YT5;F1e&ONoN~pp`_?ixfv} z$boXz{;;PjMe8-uP@W3k)YP|`(- z%|nr7)`ml#1=qo)3`t0_NT_5)C4@ft7{6o`Nf)B9N_(I6o}C;vai~00sEz+{1}OLLaOIXtwy0g!2&ELF^p;HeFF{2fL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(Zdz4^T7OeXK` z&2*ai(XR3Q?wM@?oyl-9oX&Tf}RY1ww61Rv=nrFi{SR&EdKS`bc|DJZ^m=I znFXQ2g66+SnxsLcf)JcWeYpq>{v4zPa+AZ+@8%sp#iGP?_V*Q(-PtN}vJofI#E~e& z zK@#}YUv5iz7o7(J28J02MBa<-+v2`+ zX4HGfIaU#yxAFX8X4ad)FnOzhCR5t2%?|_)S#su`IedS4!$n5M$rqXQH{bFq=VCOR e929zwX+i2{qp*7pOp6&d3r+7~#AED?7wiC0#65Wc delta 146 zcmbPtkZImQrU_XB2D^WjI=HZ&DBL1jQyX6Xa$}VWkA!98%P>X;28IWM^R+CRVx4=K z_FuYnO#I*GZ9IRNnL{I(CT|tcWcqV=^8zK$30d6 diff --git a/bgfx/shaders/dx11/fs_screen.bin b/bgfx/shaders/dx11/fs_screen.bin index 392fe4252b4af645c292b6082bdd356242efcfa1..e1984860d6da0d1ae98826786488bc92988cbc24 100644 GIT binary patch delta 132 zcmbQSpJ~Q^rU^0v1^i++-m846T>2+>v#^#T(?*>fZixf_ufrG_7#I?FKW0A^wa{hP zJy}8Xt&*9WH*o)9W)3;bxOqMQTXW9#h_kKh8!j?3PQJ*fzxj%L83)q@@y$K~`y3f_ PH*-(wWyE99O{bz`*cJ=E?lsQfu6% zF1*66w^Y$-^9Jre%*=JsOqp2M^*3K}FXLb;ShU$EV4ovn Q=VtCny^MGan*4$r02{wJX8-^I diff --git a/bgfx/shaders/dx11/fs_tint.bin b/bgfx/shaders/dx11/fs_tint.bin index 04ce07637abb5a9656a7df22fb2a16a2cfbc9d6a..708682bdaed6609054d469dd9097ec5a69313e83 100644 GIT binary patch delta 187 zcmdmdfNApqrU~u>6=tq7yMtf5$u6(Z-sPA?;_jzCEH>a3|yc@&sa7$Ps_D`kV8;$~c$|7EXR1G>u6>U~_%&Av-2XgU!y9 Tl9(7XH!qvg%ZSJRX)ibd5UW61 diff --git a/bgfx/shaders/dx11/vs_blit.bin b/bgfx/shaders/dx11/vs_blit.bin index c116cc2a4e96b2c0724619e1d71e2c7b93829b35..5a91e418e0ed86cbc2366d265d47109bfc9bd473 100644 GIT binary patch delta 117 zcmX@Tf$8)HrU{Ay(w`e1+RfVcLerQbPEYgl-i?MLJQDl;UxzU=Ffc^-U0>HP^xkES zOGIe&vyOtzu{>|A+2Xr2Th}*i_V-|MV-k+v9NL$}#3abHdFO;4Mm#zvy<-Ic{g*G0 delta 117 zcmX@Tf$8)HrU{Ay-jAz~aV$)F^!x{t)J~bO?Hdh6cqGglUxqO|A+1OrQzB0Rhv%d$68a!E diff --git a/bgfx/shaders/dx11/vs_color.bin b/bgfx/shaders/dx11/vs_color.bin index fbb6b7a15cc44e8307da418b2241d9d41569bc98..1abc2ad4ee42282355b9998642b6ecacaa98970d 100644 GIT binary patch delta 117 zcmX@Tf$8)HrU{Ay+tu{~^BEORxE+hTbIJRn^hQGw9*KSaufrG_7#RL6-m!);d%fqf zQ_~`iz@^xVRxryCP1IJ?G{!bsyrCSup`u=X}wK{+S?A-9PE0*PDFMJ>uu`k>OI)n*0iVn zK+j0pcvj(zXJ^T_ye03cc-w4u5kG(PkHV$Y|BZNXQjtvp3046^qs9!hJ-=qv7>t-MJG)w5%1z7O@`PK*gO60j@a4)4+PV|3<%xXucu;t{o~c{pACI@) z>y>)H$2i}2uSep>=dtRRmyhW8#cDax%e`K%-MxMHw%EmT0k7~sW6W27!kk%`?1QuY zU!e+Wx$r#Ym-K zoQDC}3_ip4G4MH8UzyXah*uTxv9J3m(H7l0H>IHxb6;!_5r!J-e9cO>^i;4)z9mAw zMb|C5ZqZXLdWuC)v*>9S-EGm`Lib^NV&O>3KwwKkkGAN6EeSo=qQ_bmNU-P$7G2yB zvV3N#Mae`QpS5OzdW!)|&6HqEpioPoQ0NLd=r6EHLcIG(_VwmlJSo;0cFfV0=dbOF zC;9{WDS7@Gyu_^}noi`SqZkmGeZi<-GM$mOWV$MC$#e_$HTX+5SN;;V$N)_4HSU*8 z_0pD11JWK~zO@N+Q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(4iqiqQbin1H6Vkx^Za^>vO-h4ovuJ6*NTvYHyVlS|FA+ECt@g2lC^ z6UCL*2{CuhOqA`PCVG~JrKYRnv8AaQ>X?K_+nnQZmw~AxFKWh1HDfD~K8$&O7MQoWpwEat0$#9N;Ls`0PY2n)iZGbl< zqv)+z6#`8>Z;zJ-gvCB7VL;~VWg?YZBr;JHDbxa8LTrJ(6ftdDOq?Mm+z@lZUJ5={ z=S!}v1fNZhmBE*7h;6In(Nu#s#o#@mc~cGEOoR7|=H;`?l`?aj!8>gwGfy^nA24{A zYhE})53ym#H&!zm&C2hxvyal;nk>$pzz zE8q}~j@sI=zao_#9>eQ*lf1RayqgfUJP9eL5sm)E=shC`NBFWQI6< t$UQ3sy_pc^NQ0z9_{Eh#mOz$5__UWomSbW)#%;7Qz4k diff --git a/bgfx/shaders/dx11/vs_defocus.bin b/bgfx/shaders/dx11/vs_defocus.bin index 764b3bcce776148995b9559ae556890bf0f19780..36da8e24752e92b522a27362bdc7cfa8155312bc 100644 GIT binary patch delta 109 zcmX@Tf$8)HrU{Ay-`1&gOn#w0LG-HPLGu-PrW*}KcqI1wzYb$$U|=vZNv?Oj*Y4TN qn#1?*A-~e*Se`f5Yymt|TGuyh_V-|MW71359NPDR8IO)h?^ppp%_d6=te^k9tn%amtl+y3=CG&Zh6;TQgWCV z6QM7YZo#}cmgkK%o65$FtF!Aj`+Hb;FzsWU+&Mu{j*$td8Vqt1GxHeo^7B%GJl$P- V9~l|;F>by(p@0#Op_AUR0stpWFopmC diff --git a/bgfx/shaders/dx11/vs_gui.bin b/bgfx/shaders/dx11/vs_gui.bin index a4cb697e49b2bc070b83b779488be63844e00cc9..f1707c28ed0c3423eb8c645fd610c8e3e8fdd00c 100644 GIT binary patch delta 117 zcmX@Tf$8)HrU{AyKZ;gxPMx^rA)l?Mqdm9Z!cqGglUxqO4eCKJQ4@|UxzU=FfgR}%1rI!z3bOI z(dEFN1w4_PV|m_KvuVq&XkFj1+26y$gQ-Vxa_0m+xi+9;2*^#$%wx#Q&r1bzb$97~ UWMt@3+o&W#< delta 144 zcmX@Tf$8)HrU{AyUhF(dK@Mf+YZkCfd{W?OywOmEN5Z1{ZKoxgK)EYBNjwo{CuS7+C6_V=*xV5-ob+&Mu{E(@p_0&){G^BD5-^HPCa-CcSg T85t_HH(#Alz=+4tN$*$z@_R9v diff --git a/bgfx/shaders/dx11/vs_ntsc_encode.bin b/bgfx/shaders/dx11/vs_ntsc_encode.bin index eb7997d74827b2840e215220ee6d46ca6ef5a505..c9695a27aea1dfcf1e3efbb69c55791a540e09d0 100644 GIT binary patch delta 144 zcmX@Tf$8)HrU{Ayt*=s-W^?vSJkb~D>Dswq!A3(79*O<_ufrG_7#I?x%6~__xa&PB zyYaO^-S*_ou{>|A+2)@LZC&56+26y$gNfgIa_0m+xh$Y!2*^#$%wx#Q&r1bzb$97~ UWMtsC-h6dJ0V5tmC%t0@0MS7=A^-pY delta 144 zcmX@Tf$8)HrU{Ayyi?dt2R$sDWNgc4vBZJ>>_$To9tn%amtl+y3=CeHVNqJ?Q+&F2 zStPqE`$cSy<#}VxmT>ORmD%;1{XHx^n2hx%cTUig+W}Mz0lA5pc?@~^d8t6I?k>HL Tj10zlo3BnNV8mnSq<5?U^3E_5 diff --git a/bgfx/shaders/dx11/vs_phosphor.bin b/bgfx/shaders/dx11/vs_phosphor.bin index 42eca10979151b8c0ae000523765570a81f7644f..18d3a86a8b4cfd5c3249f5701cc9fc7b0cc35fe2 100644 GIT binary patch delta 117 zcmX@Tf$8)HrU{AyJP+3FckBIOv+9oyn|j@bqK$?kJQDl;UxzU=Ffa%w#r*5~q3_e3 zeD&3<*-?)+$MU?fX8XL`p>=)3W`7SBH>S-Dn?w7On3&!$Zr(YehY^p?N$*$z(c?5a delta 117 zcmX@Tf$8)HrU{Ay6YJCTzp4LVPQ3RZ^1n}6`9?z#9trctmtl+y3=BV;I&D{o%Q`H$ zkWvt_XI{YOSe`f5Y^z>9y)wIgv%d$68`E^Y&7plsOiUdNn|Ds=VZ@_z(mPfFbx|=M diff --git a/bgfx/shaders/dx11/vs_post.bin b/bgfx/shaders/dx11/vs_post.bin index 3ec96991283e65a2cecf1cf32caf7fb067bf4e5f..fa5c59c6818803471907a5c209b62bf042c039d2 100644 GIT binary patch delta 133 zcmZoT#ME$zX@ZwP$()Oo95O62c9VDh-P8R`eq+=E9*O<_ufrG_7#ON2H5tjy6LMbr zdg(7Qp}0?*g?QiCa-3O^*}A^rBI9I3UW3hM-fSLB{}?CRP1a-j!#Fu_vJ`|TwRy?p MFh)EkO?}4=03xq7vj6}9 delta 133 zcmZoT#ME$zX@ZwP%AYT_^SJ&v7G_kYOma5}+8DKfN5Z1WSnfsYp~hOo6UnMhhehaWId)VhRJ!8r64@1%}XYS LG2$_4>N{=#;)^qQ diff --git a/bgfx/shaders/dx11/vs_ratios.bin b/bgfx/shaders/dx11/vs_ratios.bin index 0544af5799eb2d2c33760a281bcb480ccd04a179..3b79123d4f92cd8a4bdfe28a4f58bdc1cc03ecbf 100644 GIT binary patch delta 117 zcmX@Tf$8)HrU{Ayb5Grx*0|!|kKhH87OV*-l^YF3cqCpqy$)k!U|=}qJ&D;M;*f81 zj`(NYwdWZ($MU?fX3Lsmcz=1rW`7SBHzr>9&7plsOiVu*H}9O#!-z-cq<5?UDO{bz`)=qGijytuAM$z z6RK0K_8fh>IhN;*HJfg~;MLjnoBcgl+?WogY!2;9Vq(f-*t~N>4Cb# z(z0ZU{?nSxu{>|A*@`;qTGuyh_V-|MV^Xf!9NL$}#FWLbdFO;4Mm#zvy<-IcZD}qT delta 117 zcmX@Tf$8)HrU{Ayi&_sc?3(V{Qyq{M%bk1t(ndoO9tn%amtl+y3=HA>-YZ z{?EU)>zmhYj^%k{%@*updUbaFW`7SBHzqZf&7plsOiVu+H}9O#!-z-cq<5?Uifl7Z diff --git a/bgfx/shaders/dx11/vs_tint.bin b/bgfx/shaders/dx11/vs_tint.bin index ae2f439ccc39d0694207bb78dbbcdd416e31a9b3..1545fd6243a99458f62400134b132152fbf62945 100644 GIT binary patch delta 117 zcmX@Tf$8)HrU{Aye|7gaK0UQ-^55Lw#=C13Uu`rL;gNXl^g4`@fq~({I{q_-Q$P4^ zXqs@Kvq#cL8iW^-s?5);!lhRr)C^f2PlIq4lM0KNw` A>;M1& delta 117 zcmX@Tf$8)HrU{AyF<#oD#fDqgu^;8mFIg|TVWXi4kAy|z%P>X;1_qrDk9#Jv(>z*r zO`QMhHTZ3g<#}Vx_NlP;>g@W>{vIrDOzR9bhxR2gG5ulOymLYiBOaZT-mwAz0|G1f diff --git a/bgfx/shaders/dx9/fs_color.bin b/bgfx/shaders/dx9/fs_color.bin index b93489e973be22705784faff3304ed29582d4210..bcde8844dd290f5f65e01681afe1c27e15252fbb 100644 GIT binary patch delta 320 zcmX@jy^CAGE!cyFvH8$C$iIVw@785&56H{0ifZ+fC8YtZXr0WnNFM>x?LhhpkZuOj51{lLAl(Y&Gq5r+v;k=WAPrKdusNR5lBqtF z!8ydyNd_n{4^qVZ|35pB0`VCqGB8L0#a4iXL3{=#h7CX(1P%Z(6A*&5TmWJacmTv8 w5oEEqU@>MCv2S28kaPDqmvBKDs`YB1M~m?>_7^{XPn5upa2wG0TKrB8JHM$0BI070mMu| z2-0!`Bme|2fEXl#EcO*F#*8BN4=e^U52)7;NPqx0kjKQpilR^gEXIN&h8kE5n_XDS F7y$BL14af0Mur;`6)F=&m>GcJ|9>4QZ2_fSpmYF~ zjsemYKy4X7x*AAV0O?8~-2>&%0n$}K{t7662b4at@z+*HTSW%v5Jx8&piTZD>zM!l m2P$O%@fjyFFn9oI1CTI?&%nfB0i;0y>{f==o4+veF#-TsT`4U9 delta 203 zcmey!-o&Bc7VN=tSLgZ_Mg~5Y%(S%9;?&^8+=86cA_GPS21bSl6U8eNWtbU&;QxOU zDD42HeV}v%luiNC6+mqTK)M=8Hvs8MAUy@jUjn47fcyB0;!=MQ$AStvrO-rhP>X3nL1?h`zXgj<9ZCha zItX1H#L2fC_gz}%XG3(4j;Z5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15nLB24`VAoP%A|ENKfd!r%s-pffZ>m+3m)f@9e55B2z*x}FB% zym|q67lvpTTtVFjS8a4Gbd=+Cie_kzuF(y;1J%X_>ZuXpC+Y_H6*kcpdX|Q%1?|u3 z!3-wpEX~0O7|+8+xJh^6P1M5gjQeQ=e2DxId<0wIB{s3r*yqY8$vTBx=dF3eXC;G@%ZNa^^;%33WV_v$|5IRwFxyn`*&Qs2)3#Tme0mc7WJUV8p8p518t!=j diff --git a/bgfx/shaders/dx9/fs_gui.bin b/bgfx/shaders/dx9/fs_gui.bin index ec504cbec188de59f2a67b9c055cda160dac8372..405e3c1f4d93433eec1f867a4f4be0d3c77c10dc 100644 GIT binary patch delta 146 zcmZo=y~{E|%)o_-f%*UcfB&NyT%1DPH5eEeEEs_V5P+xzAZ7*P6d+~>;y(-%-P{!a zfK~ke&%p!~V)*}G1V~o^#T1~l!Nj%36TgJ0_W))00PzAK25C6~#2~RNK>PrRL1G^m O7$$Qu8BX59co6{23LXRi delta 172 zcmcc1(#kqP%piw}f%*UcfB#b%T%1DPH5eEe5*UF55P+xzAZ7*P6d+~+Vgbg9Zf=Sy zOh6{X|NjP1+6G8h0F`?H=}I6SF>$RiXGv;BY7WEd)yxyG##@2Z?*ZZkKnybX2oU!G f@dY4W0K_1%J3tH)djZ5>fEXmk!niq#k(m(y+PWZc diff --git a/bgfx/shaders/dx9/fs_ntsc_decode.bin b/bgfx/shaders/dx9/fs_ntsc_decode.bin index 855b1a4575f972f0f7cdf412dd9128594879ebe8..c5731a1312b383203e716c4d93c80057ab3fde09 100644 GIT binary patch delta 2151 zcmZA2PiPcZ90%~sP|T}UPMqI&y3Czmcw@YQx;Ac}F~1s(oH0iu z(UIYyC@xfiyfSV^d%B0rSpOiBQY2MKhU23>5wo{{FzR)dhqKRpcy>9)22$19MeAL) z;8;6~ZK5qSv>o?fU9bazy7vR{7kB~w0h90!Ow&cW zM6)zU3v_FpdtL)QKtnW4yDT;aXo8MIwV-ME8=Qx8a0%XpS-M8^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!eS<&NZbeH7d~Kf1gG#k4v1fF3!yj6Ayo56ros5bnwlA F{tLx;KS=-p diff --git a/bgfx/shaders/dx9/vs_deconverge.bin b/bgfx/shaders/dx9/vs_deconverge.bin index 9ac3015468da7c98eb74ebf667e86ed30a9fe127..cd3e0330f903cea46543883ca05b960430dc80c0 100644 GIT binary patch literal 1791 zcmb7Ey=xO;7=P~a(KNM9QL9x1GjymZAyJ1ah_n^VP_f!Z90JEBcTKNca^)^bJ7y89 zI7D!8aL6cj%_M>yT!fAlJ1A7h;Gobyp!EDbcW;{O$KuO9_j}&o^YK3K=aac?_~*6n zTQN%1l%iFs>vl<33T920r9P5qIKY-{U9ZSe6!cJlwslRGA|TJz6kF8{)jXOg4&(Xb zMv<={){)~@FKrCA!J6V&HM^)Qno)LSDGV-NQ|gAkGHY8)VTmYAH=`8VclX_obZ;tm zf1HTgGJa?7xLVFzmloUb`#dS zCDa4KJv~D`{W{8AZ)4yrWJBOr;9JNyfxiS|${2eH5}{pi17duh&uQo}>i23MfgXpI z>mP-FiUvLX0`xFqqtxe}pF7CGG{d2ONe(k zC(eHizc@x6z2SmmUg4|z^<2&5*+w(ZSx;^d;Ix^NM$X)d~zNkIF zNssf-O?TXf9_Qb`JUgQWUJ-tBkmK-q3)sEKA{c=80o{`xoD=A7^ig*|N#J=wZ1-Wo z!3v?CaNzvoDY&7e|9h*}A7PsZDAB@{KjT!~1+vg(EN2`9QKHE@sD>nToQsAW;Ni2= z^@oqA`#vF|OAXX3bh#0R4m++`0y#S^iE>RmIrtJ7kNeaFVhqn`hxL%pgOVEqlxz96 z2>f%67;Sld>=A4Py(98PkbjGFg8$IMGa}=LV|)@i*OF`T*tln?sl&1G|J?}Y??-;W rzQg&L<9S7o#f7}O;^6(b5YH2wUk7u%27L!{9oR|cwS!O7b&2R7gB*cV literal 2010 zcmb7FJB-sn5FOjO+$H456@0`;A{`*1C;=L15L_fu9O82qL=nj(v6C}$;**_(L!vMe z1t2~_P*S8s3IzovB?Tn~5;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9a70a7b0737743e2432e4c1eeb66dec1d88c528b 100644 GIT binary patch delta 70 zcmcc0yn%8G@vrZd_B E037TV-T(jq delta 115 zcmZ3%e3eYxi*VhUw3+5rIW$S4E= diff --git a/bgfx/shaders/gles/fs_defocus.bin b/bgfx/shaders/gles/fs_defocus.bin index 5dcbadcae3804bf75c1761f9037702c75f8127c0..ce0b956494a30c2959f6f3ac52f416b66918d64d 100644 GIT binary patch delta 221 zcmZqST*zVL7VN>o*!<}sGXrmFd~tG7YHD75N@i{`6C(oyBLin?d`fCsesU?4&srQ` zl3D?j0HR0C6J0|lZWo=nig)5n!HH+MAd(ZGY*quS(orY_DNfGMFG?}cRM1uca!N{z zQjJ^`G{6cbpJ%j#=mD}MCz~*7L3ue$-cZ(2IO{y4_+(RNO}KjT$<53<98in6CKobE OPQJ;k4V4yRDFOh%6-c-M delta 325 zcmZ3;(ZcEK7VN>o*!<}sGXrO7d`fCsesXCs6C(oyBLi<~d~tG7YHD75N@gxpjL#)A zEv>XTH8?T1ASbm5s0xT|SSH$putW7utkjVxhR7PZD4;5zcxf}50h7BJWzdD*F-lH8 z!l;TV>@0?AoQ?vQ0tifg&nPxIgh>}&$9iV5$#a-Y(S_eJicfyaq=`+~h*?Jjn;k$K OBqld9W9V7WTm%3@g>MA_ diff --git a/bgfx/shaders/gles/fs_distortion.bin b/bgfx/shaders/gles/fs_distortion.bin index b7afea3952d1c5b362ca9d3f93ac929a4404e7e6..d423d9b7fb81a7d54b73062839d2ac8215ca87d1 100644 GIT binary patch delta 108 zcmcaDcR)_UE!cyFvH8gcUw-^E!cyFvH8P0fo>$;>UD zsFyiWPKR diff --git a/bgfx/shaders/gles/fs_ntsc_decode.bin b/bgfx/shaders/gles/fs_ntsc_decode.bin index 199ef94c3458613941e9de7ca82b98e8b58de17e..42be06119d1b3a9a61d5a061f7169950c61bc04b 100644 GIT binary patch delta 145 zcmbPY^1)cvE!cyFvH8CPoGZ#)+J}Cf?*x;V+HP$}A~K zEs9Uf%`eR>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7P)2k$gRK~{u;dJFTqVtfCFwCeska9 zh)=<%=zh#gz*KK|0W$m))cI_+-M1_(;c$l9nA`c<#TJR2A~{$V!Q!gCjhOW#c8*%?En1bQm~_l~du-%nsEj zvDu5ITo*6kd@e8Hy}h8%?UA>r3>!ivUZ(B+-0($6k2Aox`zc&O6*v)c6P18g&h2&? zGkzKaMy)dHg({^ESIB$Sf#BS~f8d8O!;w5ok|6oOqsRT`lvz6;p|1t;)xpb znYOTOyer1Yg%F%9&!jL}hUxrdUgpg*iSZ?=70LPeMJWafx(a2f$wnFmdZs!GKtgl! zRc4LJRxCQ=CAkG*_l z4U{c|TVkkStDvEwfy=;NaXbcQuqwr27-)poz|#1l#FWg$ocQGYyt34y^wjvIoYGX> PZf0jwWHg?v$tDi~)(~QF literal 1608 zcmb_cOHYG95JpoE5?>efI!Ewojr^Cp30ERifocZ|jnT(hx zSy&cNNHJ3UvV2U+gHguH>S^XlKji+X#pt|=5x=u0TH79CuOgEH^Fkg^%Ahq|gpeUxO?Vrn$Y&c##k7XgvJ1atZaR6@ zbwdMWYjE6xhY?Jd?__{VT&T&8E2d#!(*OqfZ{WJRk*UB7C@E+Pmue)d5#no8UT;48o~d*u zlII0SeWQ?W?~=k@?XCM?y%nptbk_Fnnwmy`MZW(rJGK6QY_B1yx+|Yf99{j2e(1XP E14d{H3;+NC diff --git a/bgfx/shaders/glsl/fs_color.bin b/bgfx/shaders/glsl/fs_color.bin index 6cf2162b5231c4c49975020a7c16a04e0da11949..fc0baf998d54cab6135c5436ed67017e7b00a4d0 100644 GIT binary patch delta 45 rcmeBW|HL+-n2)tMz9hARfsp}--Z4$=It~$-9M5P4VQpT{_>2(%PPz|S delta 72 zcmeyw*2_MjSe(x#GcB#OI5jviw;(6Ah=Gv-gqSBb9!Haz?8|6{CbYSS@fjlkVqzG- diff --git a/bgfx/shaders/glsl/fs_deconverge.bin b/bgfx/shaders/glsl/fs_deconverge.bin index 756c4da04af233ea104c90f7dd6132268f5d533c..7ccc3407545ba1baa026745682ea317e6ed7d351 100644 GIT binary patch delta 70 zcmdnN+|4ZR7VN=tSLgZ_Mh4d6_>$BL21W)TDwwEH1>sLz5ddLKW@FTWvK-*7Dn>g1 D{FW8_ delta 114 zcmeBX-odQk7VN=tSLgZ_Mg~5Y%(S%9;?&^8+=86cA_hhVAeu5!yb4WX;?Eu7@C>{U+ diff --git a/bgfx/shaders/glsl/fs_defocus.bin b/bgfx/shaders/glsl/fs_defocus.bin index dd58019cf32e02010671ab4aeab8523ba73a8e00..d56afae0f77516da498fcede7319b00bef5b17a7 100644 GIT binary patch delta 237 zcmaFJ@sHicE!cyFvH8CPoGZMh4E(_>|PN{Nz$7pS3u? zB((x40Yv+mC%QUKoG&`DL4vKt zkW*4xlnPX+0Z}kHkV$OvVMcW}BrZRb4#c9#o=o0Q)_Z2L$vc=#5y~Vdi!!SrbCa1h UIiQwuP4;7woV<-$8?Lzs0JV%uYybcN delta 312 zcmeyz{*c4fE!cyFvH8|PN{N&PNCPoGZMh4!}_~PWE)YQEAl+0YH7@tdK zT3TswYH(t1K~8EBP!$kKvP`sbnm9{vV!6!3)m&&wChl5cfvQPIp)9^6wIVq`zbM5( zQ$bq+$SEl;N;Ps(&_Go=`81>C`q1nBCEZdYFp+bb*K7VN>o*!<}s2Lo?ud~tG7YHD75N@i~H#0fGJjgxsC=I6ziR2HO8W@DVnU!0g*kdsP1T#eE=Bq51IRS_$ BC0hUh delta 121 zcmeB`T_LOM7VN>o*!<}s2Lqo=W?EWlacXd4Zb43J5d$Lw5b>7A7bh2`rsl<`Wabu6 w)XSVGC&u`F;u2MfVu&&$7X?&(6Zh**=3;D__*883d`2;5G*dV4V!6x-0KXzC{{R30 diff --git a/bgfx/shaders/glsl/fs_ntsc_decode.bin b/bgfx/shaders/glsl/fs_ntsc_decode.bin index 877ddb808c5bca36b3882da9cfa8194d54ad02c4..768cfe694da1dff0f40102cc49e6fdf16fee854c 100644 GIT binary patch delta 134 zcmZ2y*kvf|7VN>o*!<}sF9UCBd~tqhQF3a0N@i{`6C(oy<3!F~6L0b;^OweFWtNnr z7R4v#=9lJ`faMrii{ndDD;PlP7#b$?GdfRhWfI-&&B)3)Igd$vvL_JFV&a0R+PsNL Sm=Vgn%q+o*!<}s??l;M6W{VU@R!DCWtNnr7RBeMr4^@^FflSPFf#C##uw+8 z7A2>~r)1_9L&W%8GSkvZi&KLWa|?1(i-4+tX!c|_M(4??jQ`jYbMs5{N+x?V=}-1# i6qP83s4{XCPoGZ#)+J96Ki>t`Ag%oGD}KQ zi{cY=^Gowez;X<%#qlMn6$~JC496yJ)|otwQFP*s&dK$R;*+C*cr_yzM9JpEjI)^_ Y%*i<{mQdDa77HlrCyce(o;8~l03ppW9{>OV delta 197 zcmew&vPzWGE!cyFvH8Bz~rFkV2vt_h+OXG|4ON)|I<5MzoifLA+(v3HJcRxjx0sz diff --git a/bgfx/shaders/glsl/fs_post.bin b/bgfx/shaders/glsl/fs_post.bin index e5a745971d783b0ce4e3e62c012bff442bda72b4..e8fde72d7039b1aa874bfe493d9db31b7f101b5b 100644 GIT binary patch delta 624 zcmX@6a7tRnE!cy_-*twk7z1Z%d~tbVL3~9e6C(oyBLi>gLGlVC)=}uhTJlTcO zk%t?oBqK2;zdXLQY+|nTk>};j+C7HRYlQkG+WLb;jOHwO2)n*5x_Rwy|?zbGZ%*qTd00m_{Gj8&V* zSix37112ELCW9*A%4W_7HeLs=X)>D*(6tBHM1bT~wh5EtSy?9^;?xo{0UA^W@+8fK2AM;GoZeb+=8;iqIgrNE$PT&ARj6y)IzAT)MOKwYIBGXRIfS6nAD1r(xOyg z7;3=cL`Oj*ttc_ML_-6r&O|{AW`Nn`F0MpI^T}_yG8xS`M{vh73R*zSRDdb5*nEOV ql99&(p~+(NdtOFHU|@aZi)6H%?89#eBYuW6y?qEQ7BMrgFvL_Y0?DRhVuBvmTs({8yiVXjHxdp9mW@vKfe3nVbtX} zXm22O>2M?)BE8Z&24sAdWs z*kKsHpww)6cp=X% z3m1lgcmC^b7cpl>i@e6{6)xOc!6L6?0hjKC6WH*SqR#1T&($r@_O)Vqi1%wZf^93Zu?9 z%DmN?;Of7BVAq!rNQNf~k&Nw;;|2~S&mHy&;p3TKC?QOeoW*DQO{MA+u;z&VDQ%p*3PI*J(Wu{EZBqPuFmx<91L8g@nxB*B(!Emdhl@m!wuC=jRut7%1o}l%*ycX&C64>L>sS&B>X}N|O&U z>xh@+7L+9x#TzMTDR3zOfrg=;fr7Te#6r;wy^2arpqM6*i>etUqEQ;3oS#>gT9lp| zUzC~xR0}i#YM8O6rZrGw8QgwD1zQCT4Gmm&^@>a4v}^JQ7Ns~01C8(+SQ=lHn39>8 XgK%L|PH8G`EBaX#8I31zWR(X1W-V@X literal 1488 zcmb_cO;3YB5T&LUiC-7>I!CA#DaBLc-D49IuY|(dtO2&!0&O+^OA}B22Y-UIYzs@b zO=IGX%$xUi_Ptr2pB}s4{jbks!z_Z5lEs*_*KWr!I>t#6%p*=n#z~YPRi(2ch*(w< zJ|zJsu`FIF#i{6*<#VMxNeUvXmqozCn1;y?p=%ve^saQYkv+v(S-~R`#5A4Dqkg)E z5#~9klOiWjlE{Y;PfZwiM`jBcA~0ifnp2i-K^{UmSw@WU7-?n5S2UYSwX#-I${v(^ z2r4pYNvVi8GK-A9FrGph<~}s3G(dG1H60C7Q`!$!?(T<$y&AeBy@Nfw&)HVmd7P3e zTE=LMuFwoD+k7`c#*n8o^glpL0XE;x+X5a0>{+hk_F>?-b_-vw5N}dSHdJUsLGv6JTh&;RtkHah<_j8L?G7hZ zj1n}-Yc^4IS{4opU@037xAiS-0ro()peWo31GYoLS1+%$c6w+Fo{i1xf+xO_sBU13 t;cw42_^;WjHEW%9csiY<%~xgmAKr-t|KoTXrJhdy$k4jxpY~yz#xGq=-oyX^ diff --git a/bgfx/shaders/metal/fs_color.bin b/bgfx/shaders/metal/fs_color.bin index f8009011b2dd609923b2ecce7c207152f2805cea..41355632c6d0f58ad2049141cb130b25b998697d 100644 GIT binary patch delta 72 zcmdnSHHnMcE!cyFvH8EVN^sH`o$QggQ`le X7_3?&KDQ*NIJY1kRd#b0(+Va4NuelZ diff --git a/bgfx/shaders/metal/fs_deconverge.bin b/bgfx/shaders/metal/fs_deconverge.bin index 296ba02f99ff8478827f8b4834e85d23257c574e..60d2550f74dfbfd785617ec979f190f9a6d10204 100644 GIT binary patch delta 142 zcmZ3>@syp%E!czQuFmx<3=G$pH}W(xvKGgeq*hFx&8P@vonj1=0*mPtC*~I9q-w%=ZDUKsC|; delta 242 zcmaFLzLtZ>E!czQuFmx<3=DEC8+jTTZCx_c(n^a{gA;QLa#D*FqN7VvD@sa>QZ)=T xV`Fs`ilO51xg|Npxdrj4$|vt&4AVgs(u3&Gz@gz4lgwlnCT-F+EhSykZvcM&TxtLS diff --git a/bgfx/shaders/metal/fs_defocus.bin b/bgfx/shaders/metal/fs_defocus.bin index 564475d1b228f19899a3c54c2fcccd931cb5cfb5..76825e2201031fd6e446b614567aee2436772122 100644 GIT binary patch delta 339 zcmZ22{9Ta8E!cyFvH8CSRI98sCayCNltNYK|HGR$vYUA>!1qhL3C)~&``-Vg)|N7 r%&nwpIL6#Ynuau%4$?Gmu=bFqVI8R&LfE=Vv*9O+8aB^kk7NV@4v*8p diff --git a/bgfx/shaders/metal/fs_distortion.bin b/bgfx/shaders/metal/fs_distortion.bin index 717075392c9901134a92ae1cd70faef269fa0e88..6c8b05620376976b6972006d0a72c671e0c47ef4 100644 GIT binary patch delta 83 zcmeyXcvF$vE!cyFvH8$C$$*fF@5Y}cBreJ0% du%KRXVs1fBsz!WnNltNYK|EM+^JZ2rZU6$D9&G>s delta 140 zcmcbq_*aqJE!cyFvH8n?BVs1fBYSH9BjEZPNo0XV?nRQT==@o;OYsBZ4$5yz L!zXXgy-@%Fs*X32 delta 179 zcmdmG{=uBvE!cyFvH8gmR4Gv z8l0G0kds<8xs^!~O=$CKCO1YMRAqX_VC5R|xg|Npxdrj4vYWYCp0JUogOhus000Sq BMfLyy diff --git a/bgfx/shaders/metal/fs_ntsc_encode.bin b/bgfx/shaders/metal/fs_ntsc_encode.bin index 01459d63024cad314c24f11af66065ccc5e80f4d..f961d2c9ab61cc72ec5336b2e483fa0ebfe242bf 100644 GIT binary patch delta 204 zcmcaE^;eR|E!cyFvH8$C$$^1-;5Y}cpraw$lU_rg&#N2|MRE_xDlAPk)f_R9^G*)+f U(l=S{@kzU|;gjCHo^1si0LEEOxBvhE delta 277 zcmew>d0mRfE!cyFvH8kQD(9g6aVCwObb|x<4aO2CQoNpgtCq?t8)~`7iT1<baYMw3Or)lqD9$n*dd3 zB<7@atXDbO~M(easjWgx$TooO)nB8NOKsrj7J zjAoOw+3lsxV0ugSO5=-@i&9hb;!`qni}flhCp&V`v`Lg4@v3+)&H delta 1144 zcmaJ=&ui0Q7+%tLSv5_!`g6KTDyV6ZG+*1KEzX1B)a{^$4ptEip+8umzev*B!a#QO zAWD6~c@jlIya~$w0dL~)tPJ!zh8Mw;7r!q}nxuzazI;62^S#gWz3-E+{N4rjM)6kg z&hm?usj1!Aki9=#J4T`5%X#=lGs8!vK)ux){zQ8iNd=lCUT#6Jov`YJdL;4ViPaxj| z+LGDq^fX<~Tsgw?&Yr)@t4*_^cEzrW9jZoIuU1=XrQS5e{(vxRjkac{VJ~=kT0o+d z65uv->R}?`o;k&2PhlAs7Ocv3v8S5Ve!1P&D~L}WCg-hb@l}PCw71@hPznmHLJ<29 z9tY3)ft{eZmh(8uVfKdBsAUCzM@7TxtYy|{c2xiAWnLIHATd_D7~-iM+zg?UirD9u zcuABJ{N|=>h*#eT*SdK=MW`O!;V+j$VUIHkZU_Y{Zd2gl=t{NoCEeH}dy>(Lc!SH$bz G==y(AYHfM| diff --git a/bgfx/shaders/metal/vs_deconverge.bin b/bgfx/shaders/metal/vs_deconverge.bin index e7cd9e2e1e9e51b4ead884ea843f220af2eba108..d150d812ceaf163b8501b5a6c80cf29c4d32c1ff 100644 GIT binary patch delta 288 zcmX@g+s(rh7VN=tSLgZ_28KVZ8+n=-x$;Ykl2hYTGINV3Z(tOgyq0n9<|L*B#>wAU z1q9M^@)JvpGz|1ibrgVv=H#2qDwAzlti(%l3(69U;*Auv6u1alS?LVWE7jcj&bhfCPsKT)5)iqRcws(41m1&+>)Gl3}u?uTnY+lIr)htMhYdl1!ajv z@g^W47<=+-W;=5rUqL|wY(S=7Vth$zMRIorientation() & ROT90) == ROT90 ? + 1 : (window.target()->orientation() & ROT180) == ROT180 ? + 2 : (window.target()->orientation() & ROT270) == ROT270 ? + 3 : 0; + bool orientation_swap_xy = (window.machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY; + bool rotation_swap_xy = (window.target()->orientation() & ROT90) == ROT90 || (window.target()->orientation() & ROT270) == ROT270; + bool swap_xy = orientation_swap_xy ^ rotation_swap_xy; + for (bgfx_chain_entry* entry : m_entries) { if (!entry->skip()) { - entry->submit(prim, current_view, textures, screen_width, screen_height, blend); + entry->submit(current_view, prim, textures, screen_width, screen_height, rotation_type, swap_xy, blend); current_view++; } } diff --git a/src/osd/modules/render/bgfx/chain.h b/src/osd/modules/render/bgfx/chain.h index 6eb4db71f4c..7ea1b1170a4 100644 --- a/src/osd/modules/render/bgfx/chain.h +++ b/src/osd/modules/render/bgfx/chain.h @@ -21,6 +21,7 @@ class render_primitive; class bgfx_slider; class bgfx_parameter; class texture_manager; +class osd_window; class bgfx_chain { @@ -28,7 +29,7 @@ public: bgfx_chain(std::string name, std::string author, std::vector sliders, std::vector params, std::vector entries, std::string output); ~bgfx_chain(); - void process(render_primitive* prim, int view, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint64_t blend = 0L); + void process(render_primitive* prim, int view, texture_manager& textures, osd_window &window, uint64_t blend = 0L); // Getters std::vector& sliders() { return m_sliders; } diff --git a/src/osd/modules/render/bgfx/chainentry.cpp b/src/osd/modules/render/bgfx/chainentry.cpp index 8b36460ad0c..fdd56aac3ab 100644 --- a/src/osd/modules/render/bgfx/chainentry.cpp +++ b/src/osd/modules/render/bgfx/chainentry.cpp @@ -44,7 +44,7 @@ bgfx_chain_entry::~bgfx_chain_entry() m_uniforms.clear(); } -void bgfx_chain_entry::submit(render_primitive* prim, int view, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint64_t blend) +void bgfx_chain_entry::submit(int view, render_primitive* prim, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint32_t rotation_type, bool swap_xy, uint64_t blend) { bgfx::setViewSeq(view, true); @@ -59,69 +59,87 @@ void bgfx_chain_entry::submit(render_primitive* prim, int view, texture_manager& put_screen_buffer(prim, &buffer); bgfx::setVertexBuffer(&buffer); - bgfx_uniform* inv_screen_dims = m_effect->uniform("u_inv_screen_dims"); - bgfx_uniform* screen_dims = m_effect->uniform("u_screen_dims"); - if (screen_dims != nullptr || inv_screen_dims != nullptr) - { - float values[2]; - float width = screen_width; - float height = screen_height; - if (m_inputs.size() > 0) - { - width = float(textures.provider(m_inputs[0].texture())->width()); - height = float(textures.provider(m_inputs[0].texture())->height()); - } - - values[0] = 1.0f / width; - values[1] = 1.0f / height; - if (inv_screen_dims != nullptr) { - inv_screen_dims->set(values, sizeof(float) * 2); - } + setup_auto_uniforms(prim, textures, screen_width, screen_height, rotation_type, swap_xy); - values[0] = width; - values[1] = height; - if (screen_dims != nullptr) { - screen_dims->set(values, sizeof(float) * 2); - } - } - - bgfx_uniform* quad_dims = m_effect->uniform("u_quad_dims"); - if (quad_dims != nullptr) - { - float values[2]; - values[0] = prim->bounds.x1 - prim->bounds.x0; - values[1] = prim->bounds.y1 - prim->bounds.y0; - quad_dims->set(values, sizeof(float) * 2); - } - - bgfx_uniform* source_dims = m_effect->uniform("u_source_dims"); - if (source_dims != nullptr) - { - float values[2]; - values[0] = float(prim->texture.width); - values[1] = float(prim->texture.height); - if (source_dims != nullptr) - { - source_dims->set(values, sizeof(float) * 2); - } - } - for (bgfx_entry_uniform* uniform : m_uniforms) { - if (uniform->name() != "DiffuseSampler") + if (uniform->name() != "s_tex") { uniform->bind(); } } m_effect->submit(view, blend); - + if (m_targets.target(m_output) != nullptr) { m_targets.target(m_output)->page_flip(); } } +void bgfx_chain_entry::setup_screensize_uniforms(texture_manager& textures, uint16_t screen_width, uint16_t screen_height) +{ + float width = screen_width; + float height = screen_height; + if (m_inputs.size() > 0) + { + width = float(textures.provider(m_inputs[0].texture())->width()); + height = float(textures.provider(m_inputs[0].texture())->height()); + } + + bgfx_uniform* screen_dims = m_effect->uniform("u_screen_dims"); + if (screen_dims != nullptr) + { + float values[2] = { width, height }; + screen_dims->set(values, sizeof(float) * 2); + } + + bgfx_uniform* inv_screen_dims = m_effect->uniform("u_inv_screen_dims"); + if (inv_screen_dims != nullptr) + { + float values[2] = { 1.0f / width, 1.0f / height }; + inv_screen_dims->set(values, sizeof(float) * 2); + } +} + +void bgfx_chain_entry::setup_sourcesize_uniform(render_primitive* prim) +{ + bgfx_uniform* source_dims = m_effect->uniform("u_source_dims"); + if (source_dims != nullptr) + { + float values[2] = { float(prim->texture.width), float(prim->texture.height) }; + source_dims->set(values, sizeof(float) * 2); + } +} + +void bgfx_chain_entry::setup_rotationtype_uniform(uint32_t rotation_type) +{ + bgfx_uniform* rotation_type_uniform = m_effect->uniform("u_rotation_type"); + if (rotation_type_uniform != nullptr) + { + float values[1] = { float(rotation_type) }; + rotation_type_uniform->set(values, sizeof(float)); + } +} + +void bgfx_chain_entry::setup_swapxy_uniform(bool swap_xy) +{ + bgfx_uniform* swap_xy_uniform = m_effect->uniform("u_swap_xy"); + if (swap_xy_uniform != nullptr) + { + float values[1] = { swap_xy ? 1.0f : 0.0f }; + swap_xy_uniform->set(values, sizeof(float)); + } +} + +void bgfx_chain_entry::setup_auto_uniforms(render_primitive* prim, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint32_t rotation_type, bool swap_xy) +{ + setup_screensize_uniforms(textures, screen_width, screen_height); + setup_sourcesize_uniform(prim); + setup_rotationtype_uniform(rotation_type); + setup_swapxy_uniform(swap_xy); +} + void bgfx_chain_entry::setup_view(int view, uint16_t screen_width, uint16_t screen_height) { bgfx::FrameBufferHandle handle = BGFX_INVALID_HANDLE; @@ -131,8 +149,8 @@ void bgfx_chain_entry::setup_view(int view, uint16_t screen_width, uint16_t scre { bgfx_target* output = m_targets.target(m_output); handle = output->target(); - width = output->width(); - height = output->height(); + width = output->width() * output->prescale_x(); + height = output->height() * output->prescale_y(); } bgfx::setViewFrameBuffer(view, handle); diff --git a/src/osd/modules/render/bgfx/chainentry.h b/src/osd/modules/render/bgfx/chainentry.h index d6e7edeaf09..5467f90ab5b 100644 --- a/src/osd/modules/render/bgfx/chainentry.h +++ b/src/osd/modules/render/bgfx/chainentry.h @@ -36,7 +36,7 @@ public: bgfx_chain_entry(std::string name, bgfx_effect* effect, std::vector suppressors, std::vector inputs, std::vector uniforms, target_manager& targets, std::string output); ~bgfx_chain_entry(); - void submit(render_primitive* prim, int view, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint64_t blend); + void submit(int view, render_primitive* prim, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint32_t rotation_type, bool swap_xy, uint64_t blend); // Getters std::string name() const { return m_name; } @@ -44,6 +44,12 @@ public: bool skip(); private: + void setup_auto_uniforms(render_primitive* prim, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint32_t rotation_type, bool swap_xy); + void setup_screensize_uniforms(texture_manager& textures, uint16_t screen_width, uint16_t screen_height); + void setup_sourcesize_uniform(render_primitive* prim); + void setup_rotationtype_uniform(uint32_t rotation_type); + void setup_swapxy_uniform(bool swap_xy); + void setup_view(int view, uint16_t screen_width, uint16_t screen_height); void put_screen_buffer(render_primitive* prim, bgfx::TransientVertexBuffer* buffer); diff --git a/src/osd/modules/render/bgfx/chainentryreader.cpp b/src/osd/modules/render/bgfx/chainentryreader.cpp index 0bf27e342cc..5c6d73e2ce9 100644 --- a/src/osd/modules/render/bgfx/chainentryreader.cpp +++ b/src/osd/modules/render/bgfx/chainentryreader.cpp @@ -10,6 +10,7 @@ #include "emu.h" #include "rendutil.h" +#include #include @@ -73,11 +74,10 @@ bgfx_chain_entry* chain_entry_reader::read_from_value(const Value& value, osd_op const Value& texture_array = value["textures"]; for (UINT32 i = 0; i < texture_array.Size(); i++) { - char texture_name[2048]; - bitmap_argb32 bitmap; - emu_file file(options.bgfx_shadow_mask(), OPEN_FLAG_READ); - strcpy(texture_name, options.bgfx_shadow_mask()); - render_load_png(bitmap, file, nullptr, texture_name); + std::string texture_path = std::string(options.bgfx_path()) + "/artwork/"; + std::string texture_name = texture_array[i].GetString(); + + textures.create_png_texture(texture_path, texture_name, texture_name); } } diff --git a/src/osd/modules/render/bgfx/chainreader.cpp b/src/osd/modules/render/bgfx/chainreader.cpp index 5addfc6fffa..68ba24183e3 100644 --- a/src/osd/modules/render/bgfx/chainreader.cpp +++ b/src/osd/modules/render/bgfx/chainreader.cpp @@ -11,6 +11,7 @@ #include #include "emu.h" +#include #include "chain.h" #include "sliderreader.h" @@ -87,12 +88,8 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, osd_options& optio uint32_t mode = uint32_t(get_enum_from_value(target_array[i], "mode", TARGET_STYLE_NATIVE, STYLE_NAMES, STYLE_COUNT)); bool bilinear = get_bool(target_array[i], "bilinear", true); bool double_buffer = get_bool(target_array[i], "doublebuffer", true); - - float prescalef = 1.0f; - float default_prescale = 1.0f; - get_float(target_array[i], "prescale", &prescalef, &default_prescale); - int prescale = (int)floor(prescalef + 0.5f); - + bool prescale = get_bool(target_array[i], "prescale", false); + uint16_t width = 0; uint16_t height = 0; switch (mode) @@ -115,10 +112,14 @@ bgfx_chain* chain_reader::read_from_value(const Value& value, osd_options& optio break; } - width *= prescale; - height *= prescale; - - targets.create_target(target_array[i]["name"].GetString(), bgfx::TextureFormat::RGBA8, width, height, mode, double_buffer, bilinear); + uint32_t prescale_x = 1; + uint32_t prescale_y = 1; + if (prescale) + { + prescale_x = options.bgfx_prescale_x(); + prescale_y = options.bgfx_prescale_y(); + } + targets.create_target(target_array[i]["name"].GetString(), bgfx::TextureFormat::RGBA8, width, height, prescale_x, prescale_y, mode, double_buffer, bilinear); } } diff --git a/src/osd/modules/render/bgfx/fs_blit.sc b/src/osd/modules/render/bgfx/fs_blit.sc index 5130d1bebb5..ff6befc4272 100644 --- a/src/osd/modules/render/bgfx/fs_blit.sc +++ b/src/osd/modules/render/bgfx/fs_blit.sc @@ -5,6 +5,7 @@ $input v_color0, v_texcoord0 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// Samplers SAMPLER2D(s_tex, 0); void main() diff --git a/src/osd/modules/render/bgfx/fs_color.sc b/src/osd/modules/render/bgfx/fs_color.sc index a90b380a8a9..fae98f2a39f 100644 --- a/src/osd/modules/render/bgfx/fs_color.sc +++ b/src/osd/modules/render/bgfx/fs_color.sc @@ -6,10 +6,9 @@ $input v_color0, v_texcoord0 // Color Convolution Effect //----------------------------------------------------------------------------- -// NB: intentionally wasteful of uniforms in order for easier slider utilization - #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// User-supplied uniform vec4 u_red_ratios; uniform vec4 u_grn_ratios; uniform vec4 u_blu_ratios; @@ -17,34 +16,28 @@ uniform vec4 u_offset; uniform vec4 u_scale; uniform vec4 u_saturation; -#define RedRatios u_red_ratios.xyz -#define GrnRatios u_grn_ratios.xyz -#define BluRatios u_blu_ratios.xyz -#define Offset u_offset.xyz -#define Scale u_scale.xyz -#define Saturation u_saturation.x - -SAMPLER2D(DiffuseSampler, 0); +// Samplers +SAMPLER2D(s_tex, 0); void main() { - vec4 BaseTexel = texture2D(DiffuseSampler, v_texcoord0); + vec4 BaseTexel = texture2D(s_tex, v_texcoord0); vec3 OutRGB = BaseTexel.rgb; // RGB Tint & Shift - float ShiftedRed = dot(OutRGB, RedRatios); - float ShiftedGrn = dot(OutRGB, GrnRatios); - float ShiftedBlu = dot(OutRGB, BluRatios); + float ShiftedRed = dot(OutRGB, u_red_ratios.xyz); + float ShiftedGrn = dot(OutRGB, u_grn_ratios.xyz); + float ShiftedBlu = dot(OutRGB, u_blu_ratios.xyz); // RGB Scale & Offset - vec3 OutTexel = vec3(ShiftedRed, ShiftedGrn, ShiftedBlu) * Scale + Offset; + vec3 OutTexel = vec3(ShiftedRed, ShiftedGrn, ShiftedBlu) * u_scale.xyz + u_offset.xyz; // Saturation vec3 Grayscale = vec3(0.299, 0.587, 0.114); float OutLuma = dot(OutTexel, Grayscale); vec3 OutChroma = OutTexel - OutLuma; - vec3 Saturated = OutLuma + OutChroma * Saturation; + vec3 Saturated = OutLuma + OutChroma * u_saturation.x; gl_FragColor = vec4(Saturated, BaseTexel.a); } diff --git a/src/osd/modules/render/bgfx/fs_deconverge.sc b/src/osd/modules/render/bgfx/fs_deconverge.sc index 343896cec2c..409896ce40a 100644 --- a/src/osd/modules/render/bgfx/fs_deconverge.sc +++ b/src/osd/modules/render/bgfx/fs_deconverge.sc @@ -6,16 +6,15 @@ $input v_color0, v_texcoord0, v_texcoord1, v_texcoord2 // Deconvergence Effect //----------------------------------------------------------------------------- -// NB: intentionally wasteful of uniforms in order for easier slider utilization - #include "../../../../../3rdparty/bgfx/examples/common/common.sh" -SAMPLER2D(DiffuseSampler, 0); +// Samplers +SAMPLER2D(s_tex, 0); void main() { - float r = texture2D(DiffuseSampler, v_texcoord0).r; - float g = texture2D(DiffuseSampler, v_texcoord1).g; - float b = texture2D(DiffuseSampler, v_texcoord2).b; + float r = texture2D(s_tex, v_texcoord0).r; + float g = texture2D(s_tex, v_texcoord1).g; + float b = texture2D(s_tex, v_texcoord2).b; gl_FragColor = vec4(r, g, b, 1.0) * v_color0; } diff --git a/src/osd/modules/render/bgfx/fs_defocus.sc b/src/osd/modules/render/bgfx/fs_defocus.sc index acd0a715557..03c442e4780 100644 --- a/src/osd/modules/render/bgfx/fs_defocus.sc +++ b/src/osd/modules/render/bgfx/fs_defocus.sc @@ -8,14 +8,14 @@ $input v_color0, v_texcoord0 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" -uniform vec4 u_screenrect; - -uniform vec4 u_defocus; - -uniform vec4 u_swap_xy; +// Autos uniform vec4 u_screen_dims; -SAMPLER2D(DiffuseSampler, 0); +// User-supplied +uniform vec4 u_defocus; + +// Samplers +SAMPLER2D(s_tex, 0); //----------------------------------------------------------------------------- // Constants @@ -32,19 +32,17 @@ void main() const vec2 Coord7Offset = vec2( 0.50, -0.75); const vec2 Coord8Offset = vec2( 1.00, -0.25); - vec2 QuadRatio = vec2(1.0, (u_swap_xy.x > 0.0) ? u_screen_dims.y / u_screen_dims.x : u_screen_dims.x / u_screen_dims.y); - vec2 DefocusTexelDims = u_defocus.xy / u_screen_dims.xy; - vec4 d0 = texture2D(DiffuseSampler, v_texcoord0); - vec4 d1 = texture2D(DiffuseSampler, v_texcoord0 + Coord1Offset * DefocusTexelDims); - vec4 d2 = texture2D(DiffuseSampler, v_texcoord0 + Coord2Offset * DefocusTexelDims); - vec4 d3 = texture2D(DiffuseSampler, v_texcoord0 + Coord3Offset * DefocusTexelDims); - vec4 d4 = texture2D(DiffuseSampler, v_texcoord0 + Coord4Offset * DefocusTexelDims); - vec4 d5 = texture2D(DiffuseSampler, v_texcoord0 + Coord5Offset * DefocusTexelDims); - vec4 d6 = texture2D(DiffuseSampler, v_texcoord0 + Coord6Offset * DefocusTexelDims); - vec4 d7 = texture2D(DiffuseSampler, v_texcoord0 + Coord7Offset * DefocusTexelDims); - vec4 d8 = texture2D(DiffuseSampler, v_texcoord0 + Coord8Offset * DefocusTexelDims); + vec4 d0 = texture2D(s_tex, v_texcoord0); + vec4 d1 = texture2D(s_tex, v_texcoord0 + Coord1Offset * DefocusTexelDims); + vec4 d2 = texture2D(s_tex, v_texcoord0 + Coord2Offset * DefocusTexelDims); + vec4 d3 = texture2D(s_tex, v_texcoord0 + Coord3Offset * DefocusTexelDims); + vec4 d4 = texture2D(s_tex, v_texcoord0 + Coord4Offset * DefocusTexelDims); + vec4 d5 = texture2D(s_tex, v_texcoord0 + Coord5Offset * DefocusTexelDims); + vec4 d6 = texture2D(s_tex, v_texcoord0 + Coord6Offset * DefocusTexelDims); + vec4 d7 = texture2D(s_tex, v_texcoord0 + Coord7Offset * DefocusTexelDims); + vec4 d8 = texture2D(s_tex, v_texcoord0 + Coord8Offset * DefocusTexelDims); vec4 blurred = (d0 + d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8) / 9.0; diff --git a/src/osd/modules/render/bgfx/fs_distortion.sc b/src/osd/modules/render/bgfx/fs_distortion.sc index 3875c785e8d..a80286cfb1a 100644 --- a/src/osd/modules/render/bgfx/fs_distortion.sc +++ b/src/osd/modules/render/bgfx/fs_distortion.sc @@ -3,44 +3,26 @@ $input v_color0, v_texcoord0 // license:BSD-3-Clause // copyright-holders:Ryan Holtz,ImJezze //----------------------------------------------------------------------------- -// Defocus Effect +// Distortion Effect //----------------------------------------------------------------------------- #include "../../../../../3rdparty/bgfx/examples/common/common.sh" -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -SAMPLER2D(DiffuseSampler, 0); - -//----------------------------------------------------------------------------- -// Uniforms -//----------------------------------------------------------------------------- - +// Autos uniform vec4 u_screen_dims; +uniform vec4 u_rotation_type; +// User-supplied uniform vec4 u_curvature; uniform vec4 u_round_corner; uniform vec4 u_smooth_border; uniform vec4 u_vignetting; uniform vec4 u_reflection; -uniform vec4 u_rotation_type; // TODO +// Samplers +SAMPLER2D(s_tex, 0); -#define CurvatureAmount u_curvature.x -#define RoundCornerAmount u_round_corner.x -#define SmoothBorderAmount u_smooth_border.x -#define VignettingAmount u_vignetting.x -#define ReflectionAmount u_reflection.x - -#define RotationType u_rotation_type.x // TODO - -//----------------------------------------------------------------------------- // Functions -//----------------------------------------------------------------------------- - -// Holy fuck the number of functions... // www.stackoverflow.com/questions/5149544/can-i-generate-a-random-number-inside-a-pixel-shader/ float rand(vec2 seed) @@ -103,11 +85,11 @@ float GetSpotAddend(vec2 coord, float amount) // normalized screen quad ratio // upper right quadrant vec2 spotOffset = vec2(-0.25, 0.25); // 0 degrees - if (RotationType == 1.0) + if (u_rotation_type.x == 1.0) spotOffset = vec2(-0.25, -0.25); // 90 degrees - if (RotationType == 2.0) + if (u_rotation_type.x == 2.0) spotOffset = vec2(0.25, -0.25); // 180 degrees - if (RotationType == 3.0) + if (u_rotation_type.x == 3.0) spotOffset = vec2(0.25, 0.25); // 270 degrees vec2 SpotCoord = (coord + spotOffset * RatioCorrection) / RatioCorrection; @@ -193,20 +175,18 @@ vec2 GetCoords(vec2 coord, float distortionAmount) return coord; } -//----------------------------------------------------------------------------- -// Distortion Pixel Shader -//----------------------------------------------------------------------------- +// Shader void main() { // Screen Curvature - vec2 BaseCoord = GetCoords(v_texcoord0, CurvatureAmount * 0.25); // reduced amount + vec2 BaseCoord = GetCoords(v_texcoord0, u_curvature.x * 0.25); // reduced amount vec2 BaseCoordCentered = BaseCoord; BaseCoordCentered -= 0.5; // Color - vec4 BaseColor = texture2D(DiffuseSampler, BaseCoord); + vec4 BaseColor = texture2D(s_tex, BaseCoord); BaseColor.a = 1.0; // Clamp @@ -216,7 +196,7 @@ void main() // Vignetting Simulation vec2 VignetteCoord = BaseCoordCentered; - float VignetteFactor = GetVignetteFactor(VignetteCoord, VignettingAmount); + float VignetteFactor = GetVignetteFactor(VignetteCoord, u_vignetting.x); BaseColor.rgb *= VignetteFactor; // Light Reflection Simulation @@ -225,14 +205,14 @@ void main() vec2 SpotCoord = BaseCoordCentered; vec2 NoiseCoord = BaseCoordCentered; - float SpotAddend = GetSpotAddend(SpotCoord, ReflectionAmount); + float SpotAddend = GetSpotAddend(SpotCoord, u_reflection.x); float NoiseFactor = GetNoiseFactor(SpotAddend, rand(NoiseCoord)); BaseColor.rgb += SpotAddend * NoiseFactor * LightColor; // Round Corners Simulation vec2 RoundCornerCoord = BaseCoordCentered; - float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, RoundCornerAmount, SmoothBorderAmount); + float roundCornerFactor = GetRoundCornerFactor(RoundCornerCoord, u_round_corner.x, u_smooth_border.x); BaseColor.rgb *= roundCornerFactor; gl_FragColor = BaseColor; diff --git a/src/osd/modules/render/bgfx/fs_gui.sc b/src/osd/modules/render/bgfx/fs_gui.sc index 28a1438d189..9f539c1182a 100644 --- a/src/osd/modules/render/bgfx/fs_gui.sc +++ b/src/osd/modules/render/bgfx/fs_gui.sc @@ -5,10 +5,10 @@ $input v_color0, v_texcoord0 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// Samplers SAMPLER2D(s_tex, 0); void main() { - vec4 texel = texture2D(s_tex, v_texcoord0); - gl_FragColor = texel * v_color0; + gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; } diff --git a/src/osd/modules/render/bgfx/fs_ntsc_decode.sc b/src/osd/modules/render/bgfx/fs_ntsc_decode.sc index 41807a1cf6f..1f5c9305053 100644 --- a/src/osd/modules/render/bgfx/fs_ntsc_decode.sc +++ b/src/osd/modules/render/bgfx/fs_ntsc_decode.sc @@ -6,10 +6,12 @@ $input v_color0, v_texcoord0 // NTSC Decode Effect //----------------------------------------------------------------------------- -// NB: intentionally wasteful of uniforms in order for easier slider utilization - #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// Autos +uniform vec4 u_source_dims; + +// User-supplied uniform vec4 u_a_value; uniform vec4 u_b_value; uniform vec4 u_cc_value; @@ -19,12 +21,13 @@ uniform vec4 u_notch_width; uniform vec4 u_y_freq_response; uniform vec4 u_i_freq_response; uniform vec4 u_q_freq_response; -uniform vec4 u_jitter_amount; uniform vec4 u_jitter_offset; -uniform vec4 u_source_dims; +// Parametric +uniform vec4 u_jitter_amount; -SAMPLER2D(DiffuseSampler, 0); +// Samplers +SAMPLER2D(s_tex, 0); //----------------------------------------------------------------------------- // Constants @@ -32,7 +35,7 @@ SAMPLER2D(DiffuseSampler, 0); void main() { - vec4 BaseTexel = texture2D(DiffuseSampler, v_texcoord0.xy); + vec4 BaseTexel = texture2D(s_tex, v_texcoord0.xy); vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); vec4 quarter = vec4(0.25, 0.25, 0.25, 0.25); @@ -71,7 +74,7 @@ void main() vec4 Cx = v_texcoord0.xxxx + u_source_dims.xxxx * (n4 * quarter); // theory: What if we put white in the input of the NTSC decode shader? - vec4 C = texture2D(DiffuseSampler, vec2(Cx.x, v_texcoord0.y)); + vec4 C = texture2D(s_tex, vec2(Cx.x, v_texcoord0.y)); vec4 T = Cx + HOffset + v_texcoord0.yyyy * VScale; vec4 WT = W * T + u_o_value.xxxx; diff --git a/src/osd/modules/render/bgfx/fs_ntsc_encode.sc b/src/osd/modules/render/bgfx/fs_ntsc_encode.sc index 52246d270dd..61f5ae12ac9 100644 --- a/src/osd/modules/render/bgfx/fs_ntsc_encode.sc +++ b/src/osd/modules/render/bgfx/fs_ntsc_encode.sc @@ -10,17 +10,22 @@ $input v_color0, v_texcoord0 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// Autos +uniform vec4 u_source_dims; + +// User-supplied uniform vec4 u_a_value; uniform vec4 u_b_value; uniform vec4 u_cc_value; uniform vec4 u_p_value; uniform vec4 u_scan_time; -uniform vec4 u_jitter_amount; uniform vec4 u_jitter_offset; -uniform vec4 u_source_dims; +// Parametric +uniform vec4 u_jitter_amount; -SAMPLER2D(DiffuseSampler, 0); +// Samplers +SAMPLER2D(s_tex, 0); //----------------------------------------------------------------------------- // Constants @@ -36,10 +41,10 @@ void main() vec2 C3 = v_texcoord0 + PValueSourceTexel * vec2(0.75, 0.0); vec4 Cx = vec4(C0.x, C1.x, C2.x, C3.x); vec4 Cy = vec4(C0.y, C1.y, C2.y, C3.y); - vec4 Texel0 = texture2D(DiffuseSampler, C0); - vec4 Texel1 = texture2D(DiffuseSampler, C1); - vec4 Texel2 = texture2D(DiffuseSampler, C2); - vec4 Texel3 = texture2D(DiffuseSampler, C3); + vec4 Texel0 = texture2D(s_tex, C0); + vec4 Texel1 = texture2D(s_tex, C1); + vec4 Texel2 = texture2D(s_tex, C2); + vec4 Texel3 = texture2D(s_tex, C3); vec4 HPosition = Cx; vec4 VPosition = Cy; diff --git a/src/osd/modules/render/bgfx/fs_phosphor.sc b/src/osd/modules/render/bgfx/fs_phosphor.sc index 90c69746822..e5ac1d91f35 100644 --- a/src/osd/modules/render/bgfx/fs_phosphor.sc +++ b/src/osd/modules/render/bgfx/fs_phosphor.sc @@ -5,9 +5,11 @@ $input v_color0, v_texcoord0 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// User-supplied uniform vec4 u_passthrough; uniform vec4 u_phosphor; +// Samplers SAMPLER2D(s_tex, 0); SAMPLER2D(s_prev, 1); diff --git a/src/osd/modules/render/bgfx/fs_post.sc b/src/osd/modules/render/bgfx/fs_post.sc index 0072ecfc525..bfe8eef42e4 100644 --- a/src/osd/modules/render/bgfx/fs_post.sc +++ b/src/osd/modules/render/bgfx/fs_post.sc @@ -8,45 +8,39 @@ $input v_color0, v_texcoord0, v_texcoord1 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// Autos uniform vec4 u_swap_xy; +uniform vec4 u_screen_dims; // size of the output window +uniform vec4 u_source_dims; // size of the guest machine +uniform vec4 u_screen_scale; // TODO: Hook up ScreenScale code-side +uniform vec4 u_screen_offset; // TODO: Hook up ScreenOffset code-side -uniform vec4 u_inv_screen_dims; // size of the window or fullscreen -uniform vec4 u_source_dims; // size of the source texture - -uniform vec4 u_shadow_dims; // size of the shadow texture (extended to power-of-two size - not necessarily in bgfx) -uniform vec4 u_shadow_uv_offset; - +// User-supplied uniform vec4 u_prepare_bloom; // disables some effects for rendering bloom textures uniform vec4 u_prepare_vector; - -uniform vec4 u_humbar_hertz_rate; // 60.0f / 59.94f - 1.0f; // difference between the 59.94 Hz field rate and 60 Hz line frequency (NTSC) -uniform vec4 u_humbar_alpha; // 0.0f; - -uniform vec4 u_time; // 0.0f; - -uniform vec4 u_screen_scale; // TODO: ScreenScale -uniform vec4 u_screen_offset; // TODO: ScreenOffset - uniform vec4 u_scanline_alpha; uniform vec4 u_scanline_scale; uniform vec4 u_scanline_bright_scale; uniform vec4 u_scanline_bright_offset; uniform vec4 u_scanline_jitter; -uniform vec4 u_jitter_amount; uniform vec4 u_scanline_height; - uniform vec4 u_back_color; // TODO: Unused in current implementation, mostly +uniform vec4 u_shadow_tile_mode; // 0 based on screen dimension, 1 based on source dimension +uniform vec4 u_shadow_alpha; +uniform vec4 u_shadow_uv; +uniform vec4 u_shadow_uv_offset; +uniform vec4 u_humbar_hertz_rate; // difference between the 59.94 Hz field rate and 60 Hz line frequency (NTSC) +uniform vec4 u_humbar_alpha; +uniform vec4 u_power; +uniform vec4 u_floor; -uniform vec4 u_shadow_tile_mode; // ShadowTileMode = 0; // 0 based on screen dimension, 1 based on source dimension -uniform vec4 u_shadow_alpha; // ShadowAlpha = 0.0f; -uniform vec4 u_shadow_count; // ShadowCount = float2(6.0f, 6.0f); -uniform vec4 u_shadow_uv; // ShadowUV = float2(0.25f, 0.25f); +// Parametric +uniform vec4 u_time; +uniform vec4 u_jitter_amount; -uniform vec4 u_power; // Power = float3(1.0f, 1.0f, 1.0f); -uniform vec4 u_floor; // Floor = float3(0.0f, 0.0f, 0.0f); - -SAMPLER2D(DiffuseSampler, 0); -SAMPLER2D(ShadowSampler, 1); +// Samplers +SAMPLER2D(s_tex, 0); +SAMPLER2D(s_shadow, 1); //----------------------------------------------------------------------------- // Scanline & Shadowmask Pixel Shader @@ -71,17 +65,17 @@ vec2 GetAdjustedCoords(vec2 coord, vec2 center_offset) void main() { - vec2 ScreenTexelDims = u_inv_screen_dims.xy; + vec2 ScreenTexelDims = vec2(1.0, 1.0) / u_screen_dims.xy; vec2 SourceTexelDims = vec2(1.0, 1.0) / u_source_dims.xy; vec2 SourceRes = u_source_dims.xy; vec2 HalfSourceRect = vec2(0.5, 0.5); - vec2 ScreenCoord = v_texcoord1 / u_inv_screen_dims.xy; + vec2 ScreenCoord = v_texcoord0.xy; vec2 BaseCoord = GetAdjustedCoords(v_texcoord0, HalfSourceRect); // Color - vec4 BaseColor = texture2D(DiffuseSampler, BaseCoord); + vec4 BaseColor = texture2D(s_tex, BaseCoord); BaseColor.a = 1.0; if (BaseCoord.x < 0.0 || BaseCoord.y < 0.0) @@ -92,18 +86,16 @@ void main() // Mask Simulation (may not affect bloom) if (u_prepare_bloom.x == 0.0 && u_shadow_alpha.x > 0.0) { - vec2 shadowDims = u_swap_xy.x > 0.0 ? u_shadow_dims.yx : u_shadow_dims.xy; - vec2 screenCoord = u_shadow_tile_mode.x == 0.0 ? ScreenCoord : BaseCoord; + vec2 screenCoord = ScreenCoord; screenCoord = u_swap_xy.x > 0.0 ? screenCoord.yx : screenCoord.xy; - vec2 shadowCount = u_swap_xy.x > 0.0 ? u_shadow_count.yx : u_shadow_count.xy; - vec2 shadowTile = ((u_shadow_tile_mode.x == 0.0 ? ScreenTexelDims : SourceTexelDims) * shadowCount); + vec2 shadowTile = (u_shadow_tile_mode.x == 0.0 ? u_screen_dims.xy : u_source_dims.xy); shadowTile = u_swap_xy.x > 0.0 ? shadowTile.yx : shadowTile.xy; - vec2 ShadowFrac = fract(screenCoord / shadowTile); + vec2 ShadowFrac = fract(screenCoord * shadowTile); vec2 ShadowCoord = (ShadowFrac * u_shadow_uv.xy); - vec4 ShadowColor = texture2D(ShadowSampler, ShadowCoord); + vec4 ShadowColor = texture2D(s_shadow, ShadowCoord); vec3 ShadowMaskColor = mix(vec3(1.0, 1.0, 1.0), ShadowColor.rgb, u_shadow_alpha.xxx); float ShadowMaskClear = (1.0 - ShadowColor.a) * u_shadow_alpha.x; diff --git a/src/osd/modules/render/bgfx/fs_ratios.sc b/src/osd/modules/render/bgfx/fs_ratios.sc deleted file mode 100644 index c45050d4a4f..00000000000 --- a/src/osd/modules/render/bgfx/fs_ratios.sc +++ /dev/null @@ -1,23 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "../../../../../3rdparty/bgfx/examples/common/common.sh" - -uniform vec4 u_ratio_amount; -uniform vec4 u_red_ratios; -uniform vec4 u_grn_ratios; -uniform vec4 u_blu_ratios; - -SAMPLER2D(s_tex, 0); - -void main() -{ - vec4 texel = texture2D(s_tex, v_texcoord0); - float red = dot(texel.rgb, u_red_ratios.rgb); - float grn = dot(texel.rgb, u_grn_ratios.rgb); - float blu = dot(texel.rgb, u_blu_ratios.rgb); - vec3 mixed = mix(texel.rgb, vec3(red, grn, blu), u_ratio_amount.x); - gl_FragColor = vec4(mixed, texel.a) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/fs_screen.sc b/src/osd/modules/render/bgfx/fs_screen.sc index 0d3539f2be8..cecf14b4730 100644 --- a/src/osd/modules/render/bgfx/fs_screen.sc +++ b/src/osd/modules/render/bgfx/fs_screen.sc @@ -5,6 +5,7 @@ $input v_color0, v_texcoord0 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" +// Samplers SAMPLER2D(s_tex, 0); void main() diff --git a/src/osd/modules/render/bgfx/fs_tint.sc b/src/osd/modules/render/bgfx/fs_tint.sc deleted file mode 100644 index 7bb433f9743..00000000000 --- a/src/osd/modules/render/bgfx/fs_tint.sc +++ /dev/null @@ -1,17 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "../../../../../3rdparty/bgfx/examples/common/common.sh" - -uniform vec4 u_tint; -uniform vec4 u_shift; - -SAMPLER2D(s_tex, 0); -uniform vec4 u_texsize; - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0.xy + u_shift.xy * u_texsize.xy) * u_tint * v_color0 + vec4(0.0, 0.0, 0.0, 1.0); -} diff --git a/src/osd/modules/render/bgfx/inputpair.cpp b/src/osd/modules/render/bgfx/inputpair.cpp index 38845a67ea5..788daf5f109 100644 --- a/src/osd/modules/render/bgfx/inputpair.cpp +++ b/src/osd/modules/render/bgfx/inputpair.cpp @@ -9,6 +9,8 @@ // //============================================================ +#include "emu.h" + #include "inputpair.h" #include "texture.h" #include "target.h" @@ -25,5 +27,6 @@ bgfx_input_pair::bgfx_input_pair(int index, std::string sampler, std::string tex void bgfx_input_pair::bind(bgfx_effect *effect, texture_manager& textures) const { + assert(effect->uniform(m_sampler) != nullptr); bgfx::setTexture(m_index, effect->uniform(m_sampler)->handle(), textures.handle(m_texture)); } diff --git a/src/osd/modules/render/bgfx/slider.cpp b/src/osd/modules/render/bgfx/slider.cpp index e9262c82a9f..355b0c2a30a 100644 --- a/src/osd/modules/render/bgfx/slider.cpp +++ b/src/osd/modules/render/bgfx/slider.cpp @@ -27,8 +27,7 @@ bgfx_slider::bgfx_slider(running_machine &machine, std::string name, int32_t min m_value = def; if (m_type != slider_type::SLIDER_INT && m_type != slider_type::SLIDER_INT_ENUM) { - float temp = float(def) * scale; - m_value = *reinterpret_cast(&temp); + m_value = float(def) * scale; } for (std::string string : strings) @@ -75,30 +74,28 @@ int32_t bgfx_slider::update(std::string *str, int32_t newval) { case SLIDER_INT_ENUM: { - INT32 *val_ptr = reinterpret_cast(&m_value); if (newval != SLIDER_NOCHANGE) { - *val_ptr = newval; + m_value = float(newval); } if (str != nullptr) { - *str = string_format(m_format, m_strings[*val_ptr]); + *str = string_format(m_format, m_strings[as_int()]); } - return *val_ptr; + return as_int(); } case SLIDER_INT: { - int *val_ptr = reinterpret_cast(&m_value); if (newval != SLIDER_NOCHANGE) { - *val_ptr = newval; + m_value = float(newval); } if (str != nullptr) { - *str = string_format(m_format, *val_ptr); + *str = string_format(m_format, as_int()); } - return *val_ptr; + return as_int(); } default: diff --git a/src/osd/modules/render/bgfx/slider.h b/src/osd/modules/render/bgfx/slider.h index 62929bd5fe1..5ba8427a54d 100644 --- a/src/osd/modules/render/bgfx/slider.h +++ b/src/osd/modules/render/bgfx/slider.h @@ -51,8 +51,8 @@ public: // Getters std::string name() const { return m_name; } slider_type type() const { return m_type; } - int32_t value() const { return m_value; } - float uniform_value() const { return *(reinterpret_cast(&m_value)); } + float value() const { return m_value; } + float uniform_value() const { return float(m_value); } slider_state* core_slider() const { return m_slider_state; } size_t size() const { return get_size_for_type(m_type); } @@ -60,6 +60,7 @@ public: protected: slider_state* create_core_slider(running_machine &machine); + int32_t as_int() const { return int32_t(floor(m_value + 0.5f)); } std::string m_name; int32_t m_min; @@ -72,7 +73,7 @@ protected: std::string m_format; std::string m_description; std::vector m_strings; - int32_t m_value; + float m_value; slider_state* m_slider_state; }; diff --git a/src/osd/modules/render/bgfx/suppressor.cpp b/src/osd/modules/render/bgfx/suppressor.cpp index d29e289ff2a..b01e0f94d04 100644 --- a/src/osd/modules/render/bgfx/suppressor.cpp +++ b/src/osd/modules/render/bgfx/suppressor.cpp @@ -39,7 +39,7 @@ bool bgfx_suppressor::suppress() count = 3; } - int32_t current_values[3]; + float current_values[3]; for (int32_t index = 0; index < count; index++) { current_values[index] = m_sliders[index]->value(); diff --git a/src/osd/modules/render/bgfx/target.cpp b/src/osd/modules/render/bgfx/target.cpp index 9fc05625b33..a71074f44d0 100644 --- a/src/osd/modules/render/bgfx/target.cpp +++ b/src/osd/modules/render/bgfx/target.cpp @@ -8,14 +8,16 @@ #include "target.h" -bgfx_target::bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t style, bool double_buffer, bool filter) +bgfx_target::bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t prescale_x, uint32_t prescale_y, uint32_t style, bool double_buffer, bool filter) : m_name(name) , m_format(format) , m_targets(nullptr) , m_textures(nullptr) , m_width(width) , m_height(height) - , m_double_buffer(double_buffer) + , m_prescale_x(prescale_x) + , m_prescale_y(prescale_y) + , m_double_buffer(double_buffer) , m_style(style) , m_filter(filter) , m_current_page(0) @@ -28,7 +30,7 @@ bgfx_target::bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uin m_targets = new bgfx::FrameBufferHandle[m_page_count]; for (int page = 0; page < m_page_count; page++) { - m_textures[page] = bgfx::createTexture2D(width, height, 1, format, wrap_mode | filter_mode | BGFX_TEXTURE_RT); + m_textures[page] = bgfx::createTexture2D(width * prescale_x, height * prescale_y, 1, format, wrap_mode | filter_mode | BGFX_TEXTURE_RT); m_targets[page] = bgfx::createFrameBuffer(1, &m_textures[page], false); } } @@ -40,7 +42,9 @@ bgfx_target::bgfx_target(void *handle, uint16_t width, uint16_t height) , m_textures(nullptr) , m_width(width) , m_height(height) - , m_double_buffer(false) + , m_prescale_x(1) + , m_prescale_y(1) + , m_double_buffer(false) , m_style(TARGET_STYLE_CUSTOM) , m_filter(false) , m_current_page(0) diff --git a/src/osd/modules/render/bgfx/target.h b/src/osd/modules/render/bgfx/target.h index a39f726c451..9900fc77f8e 100644 --- a/src/osd/modules/render/bgfx/target.h +++ b/src/osd/modules/render/bgfx/target.h @@ -27,7 +27,7 @@ enum class bgfx_target : public bgfx_texture_handle_provider { public: - bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t style, bool double_buffer, bool filter); + bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t prescale_x, uint32_t prescale_y, uint32_t style, bool double_buffer, bool filter); bgfx_target(void *handle, uint16_t width, uint16_t height); virtual ~bgfx_target(); @@ -40,6 +40,8 @@ public: bool double_buffered() const { return m_double_buffer; } uint32_t style() const { return m_style; } bool filter() const { return m_filter; } + uint32_t prescale_x() const { return m_prescale_x; } + uint32_t prescale_y() const { return m_prescale_y; } // bgfx_texture_handle_provider virtual uint16_t width() const override { return m_width; } @@ -57,7 +59,10 @@ private: uint16_t m_width; uint16_t m_height; - bool m_double_buffer; + uint32_t m_prescale_x; + uint32_t m_prescale_y; + + bool m_double_buffer; uint32_t m_style; bool m_filter; diff --git a/src/osd/modules/render/bgfx/targetmanager.cpp b/src/osd/modules/render/bgfx/targetmanager.cpp index b04a280eb1d..ede2ceefaa3 100644 --- a/src/osd/modules/render/bgfx/targetmanager.cpp +++ b/src/osd/modules/render/bgfx/targetmanager.cpp @@ -25,9 +25,9 @@ target_manager::~target_manager() m_targets.clear(); } -bgfx_target* target_manager::create_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, uint32_t style, bool double_buffer, bool filter) +bgfx_target* target_manager::create_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, uint32_t prescale_x, uint32_t prescale_y, uint32_t style, bool double_buffer, bool filter) { - bgfx_target* target = new bgfx_target(name, format, width, height, style, double_buffer, filter); + bgfx_target* target = new bgfx_target(name, format, width, height, prescale_x, prescale_y, style, double_buffer, filter); m_targets[name] = target; m_textures.add_provider(name, target); @@ -67,9 +67,11 @@ void target_manager::update_guest_targets(uint16_t width, uint16_t height) const bgfx::TextureFormat::Enum format = target_ptr->format(); const bool double_buffered = target_ptr->double_buffered(); const bool filter = target_ptr->filter(); + const uint32_t prescale_x = target_ptr->prescale_x(); + const uint32_t prescale_y = target_ptr->prescale_y(); delete target_ptr; - target.second = new bgfx_target(name, format, width, height, TARGET_STYLE_GUEST, double_buffered, filter); + target.second = new bgfx_target(name, format, width, height, prescale_x, prescale_y, TARGET_STYLE_GUEST, double_buffered, filter); m_textures.add_provider(name, target.second); } } diff --git a/src/osd/modules/render/bgfx/targetmanager.h b/src/osd/modules/render/bgfx/targetmanager.h index 34dab48ee81..e957c85fee5 100644 --- a/src/osd/modules/render/bgfx/targetmanager.h +++ b/src/osd/modules/render/bgfx/targetmanager.h @@ -28,7 +28,7 @@ public: target_manager(texture_manager& textures) : m_textures(textures), m_guest_width(16), m_guest_height(16) { } ~target_manager(); - bgfx_target* create_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, uint32_t style, bool double_buffer, bool filter); + bgfx_target* create_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, uint32_t prescale_x, uint32_t prescale_y, uint32_t style, bool double_buffer, bool filter); bgfx_target* create_backbuffer(void *handle, uint32_t width, uint32_t height); void update_guest_targets(uint16_t width, uint16_t height); diff --git a/src/osd/modules/render/bgfx/texturemanager.cpp b/src/osd/modules/render/bgfx/texturemanager.cpp index 3c32bcd13c3..f5423b34eed 100644 --- a/src/osd/modules/render/bgfx/texturemanager.cpp +++ b/src/osd/modules/render/bgfx/texturemanager.cpp @@ -11,8 +11,12 @@ #include +#include "emu.h" + #include "texturemanager.h" #include "texture.h" +#include "rendutil.h" +#include "modules/render/copyutil.h" texture_manager::~texture_manager() { @@ -46,15 +50,40 @@ bgfx_texture* texture_manager::create_texture(std::string name, bgfx::TextureFor return texture; } +bgfx_texture* texture_manager::create_png_texture(std::string path, std::string file_name, std::string texture_name, uint32_t flags) +{ + bitmap_argb32 bitmap; + emu_file file(path.c_str(), OPEN_FLAG_READ); + render_load_png(bitmap, file, nullptr, file_name.c_str()); + + uint8_t *texture_data = new uint8_t[bitmap.width() * bitmap.height() * 4]; + + uint32_t width = bitmap.width(); + uint32_t height = bitmap.height(); + uint32_t rowpixels = bitmap.rowpixels(); + void *base = bitmap.raw_pixptr(0); + for (int y = 0; y < height; y++) { + copy_util::copyline_argb32(reinterpret_cast(texture_data) + y * width, reinterpret_cast(base) + y * rowpixels, width, nullptr); + } + + bgfx_texture* texture = create_texture(texture_name, bgfx::TextureFormat::RGBA8, width, height, texture_data, flags); + + delete[] texture_data; + + return texture; +} + bgfx::TextureHandle texture_manager::handle(std::string name) { + bgfx::TextureHandle handle = BGFX_INVALID_HANDLE; std::map::iterator iter = m_textures.find(name); if (iter != m_textures.end()) { - return (iter->second)->texture(); + handle = (iter->second)->texture(); } - return BGFX_INVALID_HANDLE; + assert(handle.idx != bgfx::invalidHandle); + return handle; } bgfx_texture_handle_provider* texture_manager::provider(std::string name) diff --git a/src/osd/modules/render/bgfx/texturemanager.h b/src/osd/modules/render/bgfx/texturemanager.h index 1b757d20630..710ddc0bb34 100644 --- a/src/osd/modules/render/bgfx/texturemanager.h +++ b/src/osd/modules/render/bgfx/texturemanager.h @@ -28,6 +28,7 @@ public: ~texture_manager(); bgfx_texture* create_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, void* data = nullptr, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP); + bgfx_texture* create_png_texture(std::string path, std::string file_name, std::string texture_name, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP); void add_provider(std::string name, bgfx_texture_handle_provider* texture); // Getters diff --git a/src/osd/modules/render/bgfx/vs_deconverge.sc b/src/osd/modules/render/bgfx/vs_deconverge.sc index 21db02c490f..cb3b43f8a49 100644 --- a/src/osd/modules/render/bgfx/vs_deconverge.sc +++ b/src/osd/modules/render/bgfx/vs_deconverge.sc @@ -6,12 +6,10 @@ $output v_color0, v_texcoord0, v_texcoord1, v_texcoord2 #include "../../../../../3rdparty/bgfx/examples/common/common.sh" -uniform vec4 u_texsize; -uniform vec4 u_screenrect; - -uniform vec4 u_swap_xy; -uniform vec4 u_quad_dims; +// Autos +uniform vec4 u_source_dims; +// User-supplied uniform vec4 u_converge_red; uniform vec4 u_converge_green; uniform vec4 u_converge_blue; @@ -19,22 +17,15 @@ uniform vec4 u_radial_converge_red; uniform vec4 u_radial_converge_green; uniform vec4 u_radial_converge_blue; -uniform vec4 u_source_dims; - void main() { gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - vec2 HalfSourceRect = u_screenrect.xy * 0.5; + vec2 half_value = vec2(0.5, 0.5); - vec2 QuadRatio = vec2(1.0, (u_swap_xy.x > 0.0) ? u_quad_dims.y / u_quad_dims.x : u_quad_dims.x / u_quad_dims.y); - - // radial converge offset to "translate" the most outer pixel as thay would be translated by the linar converge with the same amount - vec2 radialConvergeOffset = 2.0 * u_screenrect.xy; - - v_texcoord0 = (a_texcoord0 - HalfSourceRect) * (1.0 + u_radial_converge_red.xy * radialConvergeOffset) + HalfSourceRect + u_converge_red.xy * (vec2(1.0, 1.0) / u_source_dims.xy); - v_texcoord1 = (a_texcoord0 - HalfSourceRect) * (1.0 + u_radial_converge_green.xy * radialConvergeOffset) + HalfSourceRect + u_converge_green.xy * (vec2(1.0, 1.0) / u_source_dims.xy); - v_texcoord2 = (a_texcoord0 - HalfSourceRect) * (1.0 + u_radial_converge_blue.xy * radialConvergeOffset) + HalfSourceRect + u_converge_blue.xy * (vec2(1.0, 1.0) / u_source_dims.xy); + v_texcoord0 = (a_texcoord0 - half_value) * (1.0 + u_radial_converge_red.xy ) + half_value + u_converge_red.xy * (vec2(1.0, 1.0) / u_source_dims.xy); + v_texcoord1 = (a_texcoord0 - half_value) * (1.0 + u_radial_converge_green.xy) + half_value + u_converge_green.xy * (vec2(1.0, 1.0) / u_source_dims.xy); + v_texcoord2 = (a_texcoord0 - half_value) * (1.0 + u_radial_converge_blue.xy ) + half_value + u_converge_blue.xy * (vec2(1.0, 1.0) / u_source_dims.xy); v_color0 = a_color0; } diff --git a/src/osd/modules/render/bgfx/vs_ratios.sc b/src/osd/modules/render/bgfx/vs_ratios.sc deleted file mode 100644 index c3699f6fbd9..00000000000 --- a/src/osd/modules/render/bgfx/vs_ratios.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input a_position, a_texcoord0, a_color0 -$output v_texcoord0, v_color0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "../../../../../3rdparty/bgfx/examples/common/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/vs_tint.sc b/src/osd/modules/render/bgfx/vs_tint.sc deleted file mode 100644 index c3699f6fbd9..00000000000 --- a/src/osd/modules/render/bgfx/vs_tint.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input a_position, a_texcoord0, a_color0 -$output v_texcoord0, v_color0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "../../../../../3rdparty/bgfx/examples/common/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/copyutil.h b/src/osd/modules/render/copyutil.h new file mode 100644 index 00000000000..f3cd3f6851a --- /dev/null +++ b/src/osd/modules/render/copyutil.h @@ -0,0 +1,167 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz +//============================================================ +// +// copyutil.h - bitmap-conversion functions +// +//============================================================ + +#pragma once + +#ifndef __RENDER_COPYUTIL__ +#define __RENDER_COPYUTIL__ + +#include "emu.h" + +class copy_util +{ +public: + static inline void copyline_palette16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette) + { + for (int x = 0; x < width; x++) + { + rgb_t srcpixel = palette[*src++]; + *dst++ = 0xff000000 | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r(); + } + } + + static inline void copyline_palettea16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette) + { + for (int x = 0; x < width; x++) + { + rgb_t srcpixel = palette[*src++]; + *dst++ = (srcpixel.a() << 24) | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r(); + } + } + + static inline void copyline_rgb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette) + { + int x; + + // palette (really RGB map) case + if (palette != nullptr) + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = 0xff000000 | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()]; + } + } + + // direct case + else + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = 0xff000000 | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r(); + } + } + } + + static inline void copyline_argb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette) + { + int x; + // palette (really RGB map) case + if (palette != nullptr) + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = (srcpix & 0xff000000) | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()]; + } + } + + // direct case + else + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = (srcpix.a() << 24) | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r(); + } + } + } + + static inline UINT32 ycc_to_rgb(UINT8 y, UINT8 cb, UINT8 cr) + { + /* original equations: + + C = Y - 16 + D = Cb - 128 + E = Cr - 128 + + R = clip(( 298 * C + 409 * E + 128) >> 8) + G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8) + B = clip(( 298 * C + 516 * D + 128) >> 8) + + R = clip(( 298 * (Y - 16) + 409 * (Cr - 128) + 128) >> 8) + G = clip(( 298 * (Y - 16) - 100 * (Cb - 128) - 208 * (Cr - 128) + 128) >> 8) + B = clip(( 298 * (Y - 16) + 516 * (Cb - 128) + 128) >> 8) + + R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8) + G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8) + B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8) + + R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8) + G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8) + B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8) + */ + int r, g, b, common; + + common = 298 * y - 298 * 16; + r = (common + 409 * cr - 409 * 128 + 128) >> 8; + g = (common - 100 * cb + 100 * 128 - 208 * cr + 208 * 128 + 128) >> 8; + b = (common + 516 * cb - 516 * 128 + 128) >> 8; + + if (r < 0) r = 0; + else if (r > 255) r = 255; + if (g < 0) g = 0; + else if (g > 255) g = 255; + if (b < 0) b = 0; + else if (b > 255) b = 255; + + return 0xff000000 | (b << 16) | (g << 8) | r; + } + + static inline void copyline_yuy16_to_argb(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette, int xprescale) + { + int x; + + assert(width % 2 == 0); + + // palette (really RGB map) case + if (palette != nullptr) + { + for (x = 0; x < width / 2; x++) + { + UINT16 srcpix0 = *src++; + UINT16 srcpix1 = *src++; + UINT8 cb = srcpix0 & 0xff; + UINT8 cr = srcpix1 & 0xff; + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(palette[0x000 + (srcpix0 >> 8)], cb, cr); + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(palette[0x000 + (srcpix1 >> 8)], cb, cr); + } + } + + // direct case + else + { + for (x = 0; x < width; x += 2) + { + UINT16 srcpix0 = *src++; + UINT16 srcpix1 = *src++; + UINT8 cb = srcpix0 & 0xff; + UINT8 cr = srcpix1 & 0xff; + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(srcpix0 >> 8, cb, cr); + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(srcpix1 >> 8, cb, cr); + } + } + } +}; + +#endif // __RENDER_COPYUTIL__ \ No newline at end of file diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp index 539c9ee4d14..4d305983ff0 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -23,6 +23,7 @@ // MAMEOS headers #include "emu.h" #include "window.h" +#include "rendutil.h" #include #include @@ -31,6 +32,7 @@ #include #include "drawbgfx.h" +#include "copyutil.h" #include "bgfx/texturemanager.h" #include "bgfx/targetmanager.h" #include "bgfx/shadermanager.h" @@ -62,7 +64,6 @@ const char* renderer_bgfx::WINDOW_PREFIX = "Window 0, "; //============================================================ #define GIBBERISH (0) -#define USE_NEW_SHADERS (1) //============================================================ // INLINES @@ -164,16 +165,17 @@ int renderer_bgfx::create() m_screen_effect[2] = m_effects->effect("screen_multiply"); m_screen_effect[3] = m_effects->effect("screen_add"); -#if USE_NEW_SHADERS m_chains = new chain_manager(options, *m_textures, *m_targets, *m_effects, m_width[window().m_index], m_height[window().m_index]); m_screen_chain = m_chains->chain(options.bgfx_screen_chain(), window().machine(), window().m_index); m_sliders_dirty = true; -#endif uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT; m_texture_cache = m_textures->create_texture("#cache", bgfx::TextureFormat::RGBA8, CACHE_SIZE, CACHE_SIZE, nullptr, flags); - memset(m_white, 0xff, sizeof(uint32_t) * 16 * 16); + uint32_t shadow_flags = 0;//BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT; + m_textures->create_png_texture(window().machine().options().art_path(), options.bgfx_shadow_mask(), "shadow", shadow_flags); + + memset(m_white, 0xff, sizeof(uint32_t) * 16 * 16); m_texinfo.push_back(rectangle_packer::packable_rectangle(WHITE_HASH, PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32), 16, 16, 16, nullptr, m_white)); return 0; @@ -186,9 +188,7 @@ int renderer_bgfx::create() renderer_bgfx::~renderer_bgfx() { // Cleanup. -#if USE_NEW_SHADERS delete m_chains; -#endif delete m_effects; delete m_shaders; delete m_textures; @@ -325,25 +325,15 @@ void renderer_bgfx::process_screen_quad(int view, render_primitive* prim) m_textures->add_provider("screen", texture); m_targets->update_guest_targets(tex_width, tex_height); - m_screen_chain->process(prim, view, *m_textures, window().get_size().width(), window().get_size().height(), get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags))); + m_screen_chain->process(prim, view, *m_textures, window(), get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags))); m_textures->add_provider("screen", nullptr); delete texture; } -void renderer_bgfx::render_post_screen_quad(int view, render_primitive* prim) +void renderer_bgfx::render_post_screen_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer) { - bgfx::TransientVertexBuffer buffer; - if (bgfx::checkAvailTransientVertexBuffer(6, ScreenVertex::ms_decl)) - { - bgfx::allocTransientVertexBuffer(&buffer, 6, ScreenVertex::ms_decl); - } - else - { - return; - } - - ScreenVertex* vertex = reinterpret_cast(buffer.data); + ScreenVertex* vertex = reinterpret_cast(buffer->data); vertex[0].m_x = prim->bounds.x0; vertex[0].m_y = prim->bounds.y0; @@ -388,7 +378,7 @@ void renderer_bgfx::render_post_screen_quad(int view, render_primitive* prim) vertex[5].m_v = prim->texcoords.tl.v; UINT32 blend = PRIMFLAG_GET_BLENDMODE(prim->flags); - bgfx::setVertexBuffer(&buffer); + bgfx::setVertexBuffer(buffer); bgfx::setTexture(0, m_screen_effect[blend]->uniform("s_tex")->handle(), m_targets->target(m_screen_chain->output())->texture()); m_screen_effect[blend]->submit(view); } @@ -654,176 +644,6 @@ uint32_t renderer_bgfx::u32Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a return (a << 24) | (b << 16) | (g << 8) | r; } -//============================================================ -// copyline_palette16 -//============================================================ - -static inline void copyline_palette16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette) -{ - for (int x = 0; x < width; x++) - { - rgb_t srcpixel = palette[*src++]; - *dst++ = 0xff000000 | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r(); - } -} - - -//============================================================ -// copyline_palettea16 -//============================================================ - -static inline void copyline_palettea16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette) -{ - for (int x = 0; x < width; x++) - { - rgb_t srcpixel = palette[*src++]; - *dst++ = (srcpixel.a() << 24) | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r(); - } -} - - -//============================================================ -// copyline_rgb32 -//============================================================ - -static inline void copyline_rgb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette) -{ - int x; - - // palette (really RGB map) case - if (palette != nullptr) - { - for (x = 0; x < width; x++) - { - rgb_t srcpix = *src++; - *dst++ = 0xff000000 | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()]; - } - } - - // direct case - else - { - for (x = 0; x < width; x++) - { - rgb_t srcpix = *src++; - *dst++ = 0xff000000 | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r(); - } - } -} - - -//============================================================ -// copyline_argb32 -//============================================================ - -static inline void copyline_argb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette) -{ - int x; - // palette (really RGB map) case - if (palette != nullptr) - { - for (x = 0; x < width; x++) - { - rgb_t srcpix = *src++; - *dst++ = (srcpix & 0xff000000) | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()]; - } - } - - // direct case - else - { - for (x = 0; x < width; x++) - { - rgb_t srcpix = *src++; - *dst++ = (srcpix.a() << 24) | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r(); - } - } -} - -static inline UINT32 ycc_to_rgb(UINT8 y, UINT8 cb, UINT8 cr) -{ - /* original equations: - - C = Y - 16 - D = Cb - 128 - E = Cr - 128 - - R = clip(( 298 * C + 409 * E + 128) >> 8) - G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8) - B = clip(( 298 * C + 516 * D + 128) >> 8) - - R = clip(( 298 * (Y - 16) + 409 * (Cr - 128) + 128) >> 8) - G = clip(( 298 * (Y - 16) - 100 * (Cb - 128) - 208 * (Cr - 128) + 128) >> 8) - B = clip(( 298 * (Y - 16) + 516 * (Cb - 128) + 128) >> 8) - - R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8) - G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8) - B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8) - - R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8) - G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8) - B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8) - */ - int r, g, b, common; - - common = 298 * y - 298 * 16; - r = (common + 409 * cr - 409 * 128 + 128) >> 8; - g = (common - 100 * cb + 100 * 128 - 208 * cr + 208 * 128 + 128) >> 8; - b = (common + 516 * cb - 516 * 128 + 128) >> 8; - - if (r < 0) r = 0; - else if (r > 255) r = 255; - if (g < 0) g = 0; - else if (g > 255) g = 255; - if (b < 0) b = 0; - else if (b > 255) b = 255; - - return 0xff000000 | (b << 16) | (g << 8) | r; -} - -//============================================================ -// copyline_yuy16_to_argb -//============================================================ - -static inline void copyline_yuy16_to_argb(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette, int xprescale) -{ - int x; - - assert(width % 2 == 0); - - // palette (really RGB map) case - if (palette != nullptr) - { - for (x = 0; x < width / 2; x++) - { - UINT16 srcpix0 = *src++; - UINT16 srcpix1 = *src++; - UINT8 cb = srcpix0 & 0xff; - UINT8 cr = srcpix1 & 0xff; - for (int x2 = 0; x2 < xprescale; x2++) - *dst++ = ycc_to_rgb(palette[0x000 + (srcpix0 >> 8)], cb, cr); - for (int x2 = 0; x2 < xprescale; x2++) - *dst++ = ycc_to_rgb(palette[0x000 + (srcpix1 >> 8)], cb, cr); - } - } - - // direct case - else - { - for (x = 0; x < width; x += 2) - { - UINT16 srcpix0 = *src++; - UINT16 srcpix1 = *src++; - UINT8 cb = srcpix0 & 0xff; - UINT8 cr = srcpix1 & 0xff; - for (int x2 = 0; x2 < xprescale; x2++) - *dst++ = ycc_to_rgb(srcpix0 >> 8, cb, cr); - for (int x2 = 0; x2 < xprescale; x2++) - *dst++ = ycc_to_rgb(srcpix1 >> 8, cb, cr); - } - } -} - const bgfx::Memory* renderer_bgfx::mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base) { const bgfx::Memory* mem = bgfx::alloc(width * height * 4); @@ -832,19 +652,19 @@ const bgfx::Memory* renderer_bgfx::mame_texture_data_to_bgfx_texture_data(UINT32 switch (format) { case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTE16): - copyline_palette16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette); + copy_util::copyline_palette16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette); break; case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTEA16): - copyline_palettea16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette); + copy_util::copyline_palettea16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette); break; case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16): - copyline_yuy16_to_argb((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette, 1); + copy_util::copyline_yuy16_to_argb((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette, 1); break; case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32): - copyline_argb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette); + copy_util::copyline_argb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette); break; case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32): - copyline_rgb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette); + copy_util::copyline_rgb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette); break; default: break; @@ -972,6 +792,7 @@ int renderer_bgfx::draw(int update) if (status != BUFFER_EMPTY) { + //printf("Drawing with gui effect\n"); fflush(stdout); bgfx::setVertexBuffer(&buffer); bgfx::setTexture(0, m_gui_effect[blend]->uniform("s_tex")->handle(), m_texture_cache->texture()); m_gui_effect[blend]->submit(view_index); @@ -982,6 +803,7 @@ int renderer_bgfx::draw(int update) prim = prim->next(); } } + //printf("Done\n\n\n"); fflush(stdout); window().m_primlist->release_lock(); @@ -1009,6 +831,7 @@ renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(int view, bool atl switch ((*prim)->type) { case render_primitive::LINE: + //printf("Putting a line at vertex index %d, vertices now %d\n", vertices, vertices + 30); fflush(stdout); put_line((*prim)->bounds.x0, (*prim)->bounds.y0, (*prim)->bounds.x1, (*prim)->bounds.y1, 1.0f, u32Color((*prim)->color.r * 255, (*prim)->color.g * 255, (*prim)->color.b * 255, (*prim)->color.a * 255), (ScreenVertex*)buffer->data + vertices, 1.0f); vertices += 30; break; @@ -1017,6 +840,7 @@ renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(int view, bool atl if ((*prim)->texture.base == nullptr) { put_packed_quad(*prim, WHITE_HASH, (ScreenVertex*)buffer->data + vertices); + //printf("Putting a blank quad at vertex index %d, vertices now %d\n", vertices, vertices + 6); fflush(stdout); vertices += 6; } else @@ -1025,23 +849,29 @@ renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(int view, bool atl if (atlas_valid && (*prim)->packable(PACKABLE_SIZE) && hash != 0 && m_hash_to_entry[hash].hash()) { put_packed_quad(*prim, hash, (ScreenVertex*)buffer->data + vertices); + //printf("Putting a packable quad at vertex index %d, vertices now %d\n", vertices, vertices + 6); fflush(stdout); vertices += 6; } else { -#if USE_NEW_SHADERS + if (vertices > 0) + { + //printf("Pre-flushing buffer\n"); + return BUFFER_PRE_FLUSH; + } + if (PRIMFLAG_GET_SCREENTEX((*prim)->flags)) { //render_screen_quad(view, *prim); - render_post_screen_quad(view, *prim); + //printf("Rendering a screen quad at vertex index %d\n", vertices); fflush(stdout); + render_post_screen_quad(view, *prim, buffer); } else { + //printf("Rendering an unpackable quad at vertex index %d\n", vertices); fflush(stdout); render_textured_quad(view, *prim, buffer); } -#else - render_textured_quad(*view, *prim, buffer); -#endif + //printf("Ignored %d vertices\n", vertices); fflush(stdout); return BUFFER_EMPTY; } } @@ -1060,6 +890,7 @@ renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(int view, bool atl *prim = (*prim)->next(); } + //printf("Rendered %d vertices\n", vertices); fflush(stdout); if (*prim == nullptr) { return BUFFER_DONE; @@ -1202,7 +1033,7 @@ bool renderer_bgfx::check_for_dirty_atlas() void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx::TransientVertexBuffer *buffer) { int vertices = 0; - + //printf("Allocating buffer\n"); bool mode_switched = false; while (prim != nullptr && !mode_switched) { @@ -1210,6 +1041,7 @@ void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx:: { case render_primitive::LINE: vertices += 30; + //printf("Encountered a line, vertices now %d\n", vertices); break; case render_primitive::QUAD: @@ -1218,19 +1050,33 @@ void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx:: if (prim->texture.base == nullptr) { vertices += 6; + //printf("Encountered a blank quad, vertices now %d\n", vertices); } else { - mode_switched = true; if (vertices == 0) { vertices += 6; + if (!PRIMFLAG_GET_SCREENTEX(prim->flags)) + { + //printf("Encountered a screen quad, vertices now %d\n", vertices); + } + else + { + //printf("Encountered an unpackable quad, vertices now %d\n", vertices); + } } + else + { + //printf("Encountered an unpackable/screen quad with %d vertices left in the buffer, ending loop.\n", vertices); + } + mode_switched = true; } } else { vertices += 6; + //printf("Encountered a packable quad, vertices now %d\n", vertices); } break; default: @@ -1248,6 +1094,7 @@ void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx:: if (vertices > 0 && bgfx::checkAvailTransientVertexBuffer(vertices, ScreenVertex::ms_decl)) { + //printf("Allocating %d transient vertices\n", vertices); bgfx::allocTransientVertexBuffer(buffer, vertices, ScreenVertex::ms_decl); } } @@ -1255,7 +1102,6 @@ void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx:: slider_state* renderer_bgfx::get_slider_list() { slider_state *listhead = nullptr; -#if USE_NEW_SHADERS slider_state **tailptr = &listhead; std::vector sliders = m_screen_chain->sliders(); for (bgfx_slider* slider : sliders) @@ -1272,6 +1118,5 @@ slider_state* renderer_bgfx::get_slider_list() } (*tailptr)->next = nullptr; m_sliders_dirty = false; -#endif return listhead; } diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h index 3b19d4edffa..2c4fc934a26 100644 --- a/src/osd/modules/render/drawbgfx.h +++ b/src/osd/modules/render/drawbgfx.h @@ -74,7 +74,7 @@ private: void process_screen_quad(int view, render_primitive* prim); void render_textured_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer); - void render_post_screen_quad(int view, render_primitive* prim); + void render_post_screen_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer); void put_packed_quad(render_primitive *prim, UINT32 hash, ScreenVertex* vertex); void put_polygon(const float* coords, UINT32 num_coords, float r, UINT32 rgba, ScreenVertex* vertex);