From ea9e591a0c5d0e16a6d7fcfb4c5eb3e633977993 Mon Sep 17 00:00:00 2001 From: "therealmogminer@gmail.com" Date: Fri, 18 Mar 2016 03:21:34 +0100 Subject: 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 75 files changed, 165 insertions(+), 289 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 (limited to 'bgfx') 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": "internal" + }, + { "effect": "blit", + "name": "Final Downscale", + "input": [ + { "sampler": "s_tex", "texture": "internal" } ], - "output": "native" + "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 185d5a65b6a..ffaaa190950 100644 Binary files a/bgfx/shaders/dx11/fs_blit.bin and b/bgfx/shaders/dx11/fs_blit.bin differ diff --git a/bgfx/shaders/dx11/fs_color.bin b/bgfx/shaders/dx11/fs_color.bin index ce7cde86c96..5cbf93eb345 100644 Binary files a/bgfx/shaders/dx11/fs_color.bin and b/bgfx/shaders/dx11/fs_color.bin differ diff --git a/bgfx/shaders/dx11/fs_deconverge.bin b/bgfx/shaders/dx11/fs_deconverge.bin index 3c6744c0def..cfd2f01541b 100644 Binary files a/bgfx/shaders/dx11/fs_deconverge.bin and b/bgfx/shaders/dx11/fs_deconverge.bin differ diff --git a/bgfx/shaders/dx11/fs_defocus.bin b/bgfx/shaders/dx11/fs_defocus.bin index 3d4c59a7faf..27bae0bf11a 100644 Binary files a/bgfx/shaders/dx11/fs_defocus.bin and b/bgfx/shaders/dx11/fs_defocus.bin differ diff --git a/bgfx/shaders/dx11/fs_distortion.bin b/bgfx/shaders/dx11/fs_distortion.bin index 434d894b279..77295d7a4b7 100644 Binary files a/bgfx/shaders/dx11/fs_distortion.bin and b/bgfx/shaders/dx11/fs_distortion.bin differ diff --git a/bgfx/shaders/dx11/fs_gui.bin b/bgfx/shaders/dx11/fs_gui.bin index 0c91226bafa..5f452bdc4f2 100644 Binary files a/bgfx/shaders/dx11/fs_gui.bin and b/bgfx/shaders/dx11/fs_gui.bin differ diff --git a/bgfx/shaders/dx11/fs_ntsc_decode.bin b/bgfx/shaders/dx11/fs_ntsc_decode.bin index ac5fd682c48..327d86d1fce 100644 Binary files a/bgfx/shaders/dx11/fs_ntsc_decode.bin and b/bgfx/shaders/dx11/fs_ntsc_decode.bin differ diff --git a/bgfx/shaders/dx11/fs_ntsc_encode.bin b/bgfx/shaders/dx11/fs_ntsc_encode.bin index 6f4d2bcfe36..05f2161a539 100644 Binary files a/bgfx/shaders/dx11/fs_ntsc_encode.bin and b/bgfx/shaders/dx11/fs_ntsc_encode.bin differ diff --git a/bgfx/shaders/dx11/fs_phosphor.bin b/bgfx/shaders/dx11/fs_phosphor.bin index bdc6523bb0d..1a9430af3ad 100644 Binary files a/bgfx/shaders/dx11/fs_phosphor.bin and b/bgfx/shaders/dx11/fs_phosphor.bin differ diff --git a/bgfx/shaders/dx11/fs_post.bin b/bgfx/shaders/dx11/fs_post.bin index 9797487029f..b0f7026a48b 100644 Binary files a/bgfx/shaders/dx11/fs_post.bin and b/bgfx/shaders/dx11/fs_post.bin differ diff --git a/bgfx/shaders/dx11/fs_ratios.bin b/bgfx/shaders/dx11/fs_ratios.bin index 491c3f99f47..e55574117d5 100644 Binary files a/bgfx/shaders/dx11/fs_ratios.bin and b/bgfx/shaders/dx11/fs_ratios.bin differ diff --git a/bgfx/shaders/dx11/fs_screen.bin b/bgfx/shaders/dx11/fs_screen.bin index 392fe4252b4..e1984860d6d 100644 Binary files a/bgfx/shaders/dx11/fs_screen.bin and b/bgfx/shaders/dx11/fs_screen.bin differ diff --git a/bgfx/shaders/dx11/fs_tint.bin b/bgfx/shaders/dx11/fs_tint.bin index 04ce07637ab..708682bdaed 100644 Binary files a/bgfx/shaders/dx11/fs_tint.bin and b/bgfx/shaders/dx11/fs_tint.bin differ diff --git a/bgfx/shaders/dx11/vs_blit.bin b/bgfx/shaders/dx11/vs_blit.bin index c116cc2a4e9..5a91e418e0e 100644 Binary files a/bgfx/shaders/dx11/vs_blit.bin and b/bgfx/shaders/dx11/vs_blit.bin differ diff --git a/bgfx/shaders/dx11/vs_color.bin b/bgfx/shaders/dx11/vs_color.bin index fbb6b7a15cc..1abc2ad4ee4 100644 Binary files a/bgfx/shaders/dx11/vs_color.bin and b/bgfx/shaders/dx11/vs_color.bin differ diff --git a/bgfx/shaders/dx11/vs_deconverge.bin b/bgfx/shaders/dx11/vs_deconverge.bin index 8057739fc5a..e23c0d8a2c4 100644 Binary files a/bgfx/shaders/dx11/vs_deconverge.bin and b/bgfx/shaders/dx11/vs_deconverge.bin differ diff --git a/bgfx/shaders/dx11/vs_defocus.bin b/bgfx/shaders/dx11/vs_defocus.bin index 764b3bcce77..36da8e24752 100644 Binary files a/bgfx/shaders/dx11/vs_defocus.bin and b/bgfx/shaders/dx11/vs_defocus.bin differ diff --git a/bgfx/shaders/dx11/vs_distortion.bin b/bgfx/shaders/dx11/vs_distortion.bin index 732acef5941..4f021030a66 100644 Binary files a/bgfx/shaders/dx11/vs_distortion.bin and b/bgfx/shaders/dx11/vs_distortion.bin differ diff --git a/bgfx/shaders/dx11/vs_gui.bin b/bgfx/shaders/dx11/vs_gui.bin index a4cb697e49b..f1707c28ed0 100644 Binary files a/bgfx/shaders/dx11/vs_gui.bin and b/bgfx/shaders/dx11/vs_gui.bin differ diff --git a/bgfx/shaders/dx11/vs_ntsc_decode.bin b/bgfx/shaders/dx11/vs_ntsc_decode.bin index e8488bee668..62adb591763 100644 Binary files a/bgfx/shaders/dx11/vs_ntsc_decode.bin and b/bgfx/shaders/dx11/vs_ntsc_decode.bin differ diff --git a/bgfx/shaders/dx11/vs_ntsc_encode.bin b/bgfx/shaders/dx11/vs_ntsc_encode.bin index eb7997d7482..c9695a27aea 100644 Binary files a/bgfx/shaders/dx11/vs_ntsc_encode.bin and b/bgfx/shaders/dx11/vs_ntsc_encode.bin differ diff --git a/bgfx/shaders/dx11/vs_phosphor.bin b/bgfx/shaders/dx11/vs_phosphor.bin index 42eca109791..18d3a86a8b4 100644 Binary files a/bgfx/shaders/dx11/vs_phosphor.bin and b/bgfx/shaders/dx11/vs_phosphor.bin differ diff --git a/bgfx/shaders/dx11/vs_post.bin b/bgfx/shaders/dx11/vs_post.bin index 3ec96991283..fa5c59c6818 100644 Binary files a/bgfx/shaders/dx11/vs_post.bin and b/bgfx/shaders/dx11/vs_post.bin differ diff --git a/bgfx/shaders/dx11/vs_ratios.bin b/bgfx/shaders/dx11/vs_ratios.bin index 0544af5799e..3b79123d4f9 100644 Binary files a/bgfx/shaders/dx11/vs_ratios.bin and b/bgfx/shaders/dx11/vs_ratios.bin differ diff --git a/bgfx/shaders/dx11/vs_screen.bin b/bgfx/shaders/dx11/vs_screen.bin index fe3145fa0ed..96dc86dc5f0 100644 Binary files a/bgfx/shaders/dx11/vs_screen.bin and b/bgfx/shaders/dx11/vs_screen.bin differ diff --git a/bgfx/shaders/dx11/vs_tint.bin b/bgfx/shaders/dx11/vs_tint.bin index ae2f439ccc3..1545fd6243a 100644 Binary files a/bgfx/shaders/dx11/vs_tint.bin and b/bgfx/shaders/dx11/vs_tint.bin differ diff --git a/bgfx/shaders/dx9/fs_color.bin b/bgfx/shaders/dx9/fs_color.bin index b93489e973b..bcde8844dd2 100644 Binary files a/bgfx/shaders/dx9/fs_color.bin and b/bgfx/shaders/dx9/fs_color.bin differ diff --git a/bgfx/shaders/dx9/fs_deconverge.bin b/bgfx/shaders/dx9/fs_deconverge.bin index c9628442dc4..b98ee3cb31d 100644 Binary files a/bgfx/shaders/dx9/fs_deconverge.bin and b/bgfx/shaders/dx9/fs_deconverge.bin differ diff --git a/bgfx/shaders/dx9/fs_defocus.bin b/bgfx/shaders/dx9/fs_defocus.bin index 044c0f02dbd..6ba9faa3292 100644 Binary files a/bgfx/shaders/dx9/fs_defocus.bin and b/bgfx/shaders/dx9/fs_defocus.bin differ diff --git a/bgfx/shaders/dx9/fs_distortion.bin b/bgfx/shaders/dx9/fs_distortion.bin index 6e74df22b60..7b0fa91eb2f 100644 Binary files a/bgfx/shaders/dx9/fs_distortion.bin and b/bgfx/shaders/dx9/fs_distortion.bin differ diff --git a/bgfx/shaders/dx9/fs_gui.bin b/bgfx/shaders/dx9/fs_gui.bin index ec504cbec18..405e3c1f4d9 100644 Binary files a/bgfx/shaders/dx9/fs_gui.bin and b/bgfx/shaders/dx9/fs_gui.bin differ diff --git a/bgfx/shaders/dx9/fs_ntsc_decode.bin b/bgfx/shaders/dx9/fs_ntsc_decode.bin index 855b1a4575f..c5731a1312b 100644 Binary files a/bgfx/shaders/dx9/fs_ntsc_decode.bin and b/bgfx/shaders/dx9/fs_ntsc_decode.bin differ diff --git a/bgfx/shaders/dx9/fs_ntsc_encode.bin b/bgfx/shaders/dx9/fs_ntsc_encode.bin index 26d087e2f18..375d4339fcc 100644 Binary files a/bgfx/shaders/dx9/fs_ntsc_encode.bin and b/bgfx/shaders/dx9/fs_ntsc_encode.bin differ diff --git a/bgfx/shaders/dx9/fs_post.bin b/bgfx/shaders/dx9/fs_post.bin index fb01e30626c..8bb9bd011e5 100644 Binary files a/bgfx/shaders/dx9/fs_post.bin and b/bgfx/shaders/dx9/fs_post.bin differ diff --git a/bgfx/shaders/dx9/vs_deconverge.bin b/bgfx/shaders/dx9/vs_deconverge.bin index 9ac3015468d..cd3e0330f90 100644 Binary files a/bgfx/shaders/dx9/vs_deconverge.bin and b/bgfx/shaders/dx9/vs_deconverge.bin differ diff --git a/bgfx/shaders/gles/fs_color.bin b/bgfx/shaders/gles/fs_color.bin index aa4e13d03ae..a0379220e9c 100644 Binary files a/bgfx/shaders/gles/fs_color.bin and b/bgfx/shaders/gles/fs_color.bin differ diff --git a/bgfx/shaders/gles/fs_deconverge.bin b/bgfx/shaders/gles/fs_deconverge.bin index 33f2f66a503..9a70a7b0737 100644 Binary files a/bgfx/shaders/gles/fs_deconverge.bin and b/bgfx/shaders/gles/fs_deconverge.bin differ diff --git a/bgfx/shaders/gles/fs_defocus.bin b/bgfx/shaders/gles/fs_defocus.bin index 5dcbadcae38..ce0b956494a 100644 Binary files a/bgfx/shaders/gles/fs_defocus.bin and b/bgfx/shaders/gles/fs_defocus.bin differ diff --git a/bgfx/shaders/gles/fs_distortion.bin b/bgfx/shaders/gles/fs_distortion.bin index b7afea3952d..d423d9b7fb8 100644 Binary files a/bgfx/shaders/gles/fs_distortion.bin and b/bgfx/shaders/gles/fs_distortion.bin differ diff --git a/bgfx/shaders/gles/fs_ntsc_decode.bin b/bgfx/shaders/gles/fs_ntsc_decode.bin index 199ef94c345..42be06119d1 100644 Binary files a/bgfx/shaders/gles/fs_ntsc_decode.bin and b/bgfx/shaders/gles/fs_ntsc_decode.bin differ diff --git a/bgfx/shaders/gles/fs_ntsc_encode.bin b/bgfx/shaders/gles/fs_ntsc_encode.bin index d2d5c0d24f7..539db74272f 100644 Binary files a/bgfx/shaders/gles/fs_ntsc_encode.bin and b/bgfx/shaders/gles/fs_ntsc_encode.bin differ diff --git a/bgfx/shaders/gles/fs_post.bin b/bgfx/shaders/gles/fs_post.bin index 04cbd642e9c..737b66a600b 100644 Binary files a/bgfx/shaders/gles/fs_post.bin and b/bgfx/shaders/gles/fs_post.bin differ diff --git a/bgfx/shaders/gles/vs_deconverge.bin b/bgfx/shaders/gles/vs_deconverge.bin index 7f418b7ac9c..7454e88335b 100644 Binary files a/bgfx/shaders/gles/vs_deconverge.bin and b/bgfx/shaders/gles/vs_deconverge.bin differ diff --git a/bgfx/shaders/glsl/fs_color.bin b/bgfx/shaders/glsl/fs_color.bin index 6cf2162b523..fc0baf998d5 100644 Binary files a/bgfx/shaders/glsl/fs_color.bin and b/bgfx/shaders/glsl/fs_color.bin differ diff --git a/bgfx/shaders/glsl/fs_deconverge.bin b/bgfx/shaders/glsl/fs_deconverge.bin index 756c4da04af..7ccc3407545 100644 Binary files a/bgfx/shaders/glsl/fs_deconverge.bin and b/bgfx/shaders/glsl/fs_deconverge.bin differ diff --git a/bgfx/shaders/glsl/fs_defocus.bin b/bgfx/shaders/glsl/fs_defocus.bin index dd58019cf32..d56afae0f77 100644 Binary files a/bgfx/shaders/glsl/fs_defocus.bin and b/bgfx/shaders/glsl/fs_defocus.bin differ diff --git a/bgfx/shaders/glsl/fs_distortion.bin b/bgfx/shaders/glsl/fs_distortion.bin index a5abb519a56..9ec60e1a440 100644 Binary files a/bgfx/shaders/glsl/fs_distortion.bin and b/bgfx/shaders/glsl/fs_distortion.bin differ diff --git a/bgfx/shaders/glsl/fs_ntsc_decode.bin b/bgfx/shaders/glsl/fs_ntsc_decode.bin index 877ddb808c5..768cfe694da 100644 Binary files a/bgfx/shaders/glsl/fs_ntsc_decode.bin and b/bgfx/shaders/glsl/fs_ntsc_decode.bin differ diff --git a/bgfx/shaders/glsl/fs_ntsc_encode.bin b/bgfx/shaders/glsl/fs_ntsc_encode.bin index 9d03f2897fe..2f316b21936 100644 Binary files a/bgfx/shaders/glsl/fs_ntsc_encode.bin and b/bgfx/shaders/glsl/fs_ntsc_encode.bin differ diff --git a/bgfx/shaders/glsl/fs_post.bin b/bgfx/shaders/glsl/fs_post.bin index e5a745971d7..e8fde72d703 100644 Binary files a/bgfx/shaders/glsl/fs_post.bin and b/bgfx/shaders/glsl/fs_post.bin differ diff --git a/bgfx/shaders/glsl/vs_deconverge.bin b/bgfx/shaders/glsl/vs_deconverge.bin index 305aae8f18f..5b332158522 100644 Binary files a/bgfx/shaders/glsl/vs_deconverge.bin and b/bgfx/shaders/glsl/vs_deconverge.bin differ diff --git a/bgfx/shaders/metal/fs_color.bin b/bgfx/shaders/metal/fs_color.bin index f8009011b2d..41355632c6d 100644 Binary files a/bgfx/shaders/metal/fs_color.bin and b/bgfx/shaders/metal/fs_color.bin differ diff --git a/bgfx/shaders/metal/fs_deconverge.bin b/bgfx/shaders/metal/fs_deconverge.bin index 296ba02f99f..60d2550f74d 100644 Binary files a/bgfx/shaders/metal/fs_deconverge.bin and b/bgfx/shaders/metal/fs_deconverge.bin differ diff --git a/bgfx/shaders/metal/fs_defocus.bin b/bgfx/shaders/metal/fs_defocus.bin index 564475d1b22..76825e22010 100644 Binary files a/bgfx/shaders/metal/fs_defocus.bin and b/bgfx/shaders/metal/fs_defocus.bin differ diff --git a/bgfx/shaders/metal/fs_distortion.bin b/bgfx/shaders/metal/fs_distortion.bin index 717075392c9..6c8b0562037 100644 Binary files a/bgfx/shaders/metal/fs_distortion.bin and b/bgfx/shaders/metal/fs_distortion.bin differ diff --git a/bgfx/shaders/metal/fs_ntsc_decode.bin b/bgfx/shaders/metal/fs_ntsc_decode.bin index d3e0812ca51..a3ad6554fe6 100644 Binary files a/bgfx/shaders/metal/fs_ntsc_decode.bin and b/bgfx/shaders/metal/fs_ntsc_decode.bin differ diff --git a/bgfx/shaders/metal/fs_ntsc_encode.bin b/bgfx/shaders/metal/fs_ntsc_encode.bin index 01459d63024..f961d2c9ab6 100644 Binary files a/bgfx/shaders/metal/fs_ntsc_encode.bin and b/bgfx/shaders/metal/fs_ntsc_encode.bin differ diff --git a/bgfx/shaders/metal/fs_post.bin b/bgfx/shaders/metal/fs_post.bin index 6f15dc13093..e0f1f4167ad 100644 Binary files a/bgfx/shaders/metal/fs_post.bin and b/bgfx/shaders/metal/fs_post.bin differ diff --git a/bgfx/shaders/metal/vs_deconverge.bin b/bgfx/shaders/metal/vs_deconverge.bin index e7cd9e2e1e9..d150d812cea 100644 Binary files a/bgfx/shaders/metal/vs_deconverge.bin and b/bgfx/shaders/metal/vs_deconverge.bin differ -- cgit v1.2.3