diff options
author | 2016-04-25 01:05:19 +0200 | |
---|---|---|
committer | 2016-04-25 02:12:59 +0200 | |
commit | ea6bc4d8ce5734b9167fde917d5e0c8d406925ac (patch) | |
tree | 994564e0cdf70f8a7ff3da171f94cb0b66a306f0 | |
parent | 6d0dfc548c03060833366731e39f761a9216927c (diff) |
bgfx: Ported xBR shaders from libretro. [Ryan Holtz, Hyllian]
653 files changed, 9721 insertions, 762 deletions
diff --git a/bgfx/chains/default.json b/bgfx/chains/default.json index b25388c3735..d7e31536780 100644 --- a/bgfx/chains/default.json +++ b/bgfx/chains/default.json @@ -1,4 +1,4 @@ -{ "name": "Default Bilinear Filter", +{ "name": "Default Nearest-Neighbor Filter", "author": "Ryan Holtz", "targets": [ { "name": "temp", @@ -8,10 +8,17 @@ ], "passes": [ { "effect": "misc/blit", - "name": "Final Upscale", + "name": "Copy To Filtered Texture", "input": [ { "sampler": "s_tex", "texture": "screen" } ], + "output": "temp" + }, + { "effect": "misc/blit", + "name": "Final Upscale", + "input": [ + { "sampler": "s_tex", "target": "temp" } + ], "output": "output" } ] diff --git a/bgfx/chains/supereagle.json b/bgfx/chains/eagle/super-eagle.json index cf3294e8a36..017c03b7179 100644 --- a/bgfx/chains/supereagle.json +++ b/bgfx/chains/eagle/super-eagle.json @@ -25,7 +25,7 @@ ], "passes": [ { - "effect": "supereagle/supereagle", + "effect": "eagle/supereagle", "name": "Super Eagle pass", "input": [ { "sampler": "decal", "texture": "screen" }, diff --git a/bgfx/chains/hq2x.json b/bgfx/chains/hqx/hq2x.json index 19eb14d6113..b525942d24c 100644 --- a/bgfx/chains/hq2x.json +++ b/bgfx/chains/hqx/hq2x.json @@ -41,7 +41,7 @@ ], "passes": [ { - "effect": "hq2x/hq2x", + "effect": "hqx/hq2x", "name": "HQ2x pass", "input": [ { "sampler": "decal", "texture": "screen" }, diff --git a/bgfx/chains/hq3x.json b/bgfx/chains/hqx/hq3x.json index 6e1f031d705..5d735f40f02 100644 --- a/bgfx/chains/hq3x.json +++ b/bgfx/chains/hqx/hq3x.json @@ -41,7 +41,7 @@ ], "passes": [ { - "effect": "hq3x/hq3x", + "effect": "hqx/hq3x", "name": "HQ3x pass", "input": [ { "sampler": "decal", "texture": "screen" }, diff --git a/bgfx/chains/hq4x.json b/bgfx/chains/hqx/hq4x.json index 78548abfca7..499fa23ac6a 100644 --- a/bgfx/chains/hq4x.json +++ b/bgfx/chains/hqx/hq4x.json @@ -41,7 +41,7 @@ ], "passes": [ { - "effect": "hq4x/hq4x", + "effect": "hqx/hq4x", "name": "HQ4x pass", "input": [ { "sampler": "decal", "texture": "screen" }, diff --git a/bgfx/chains/unfiltered.json b/bgfx/chains/unfiltered.json index e8983f6dd5c..6a65031f349 100644 --- a/bgfx/chains/unfiltered.json +++ b/bgfx/chains/unfiltered.json @@ -1,24 +1,11 @@ { "name": "Default Nearest-Neighbor Filter", "author": "Ryan Holtz", - "targets": [ - { "name": "temp", - "mode": "guest", - "bilinear": false - } - ], "passes": [ { "effect": "misc/blit", - "name": "Copy To Unstretched Texture", + "name": "Unfiltered Upscale", "input": [ { "sampler": "s_tex", "texture": "screen" } ], - "output": "temp" - }, - { "effect": "misc/blit", - "name": "Final Upscale", - "input": [ - { "sampler": "s_tex", "target": "temp" } - ], "output": "output" } ] diff --git a/bgfx/chains/super-2xbr-3d-2p.json b/bgfx/chains/xbr/super-2xbr-3d-2p.json index a196141548d..a196141548d 100644 --- a/bgfx/chains/super-2xbr-3d-2p.json +++ b/bgfx/chains/xbr/super-2xbr-3d-2p.json diff --git a/bgfx/chains/super-2xbr-3d-3p-smoother.json b/bgfx/chains/xbr/super-2xbr-3d-3p-smoother.json index d3e3d33d7c4..d3e3d33d7c4 100644 --- a/bgfx/chains/super-2xbr-3d-3p-smoother.json +++ b/bgfx/chains/xbr/super-2xbr-3d-3p-smoother.json diff --git a/bgfx/chains/super-4xbr-3d-4p.json b/bgfx/chains/xbr/super-4xbr-3d-4p.json index 046897b62d5..046897b62d5 100644 --- a/bgfx/chains/super-4xbr-3d-4p.json +++ b/bgfx/chains/xbr/super-4xbr-3d-4p.json diff --git a/bgfx/chains/super-4xbr-3d-6p-smoother.json b/bgfx/chains/xbr/super-4xbr-3d-6p-smoother.json index f3bd617258f..f3bd617258f 100644 --- a/bgfx/chains/super-4xbr-3d-6p-smoother.json +++ b/bgfx/chains/xbr/super-4xbr-3d-6p-smoother.json diff --git a/bgfx/chains/super-xbr-2p.json b/bgfx/chains/xbr/super-xbr-2p.json index cdb8c3f84a5..cdb8c3f84a5 100644 --- a/bgfx/chains/super-xbr-2p.json +++ b/bgfx/chains/xbr/super-xbr-2p.json diff --git a/bgfx/chains/super-xbr-3p-smoother.json b/bgfx/chains/xbr/super-xbr-3p-smoother.json index 96bda7904b6..96bda7904b6 100644 --- a/bgfx/chains/super-xbr-3p-smoother.json +++ b/bgfx/chains/xbr/super-xbr-3p-smoother.json diff --git a/bgfx/chains/super-xbr-6p.json b/bgfx/chains/xbr/super-xbr-6p.json index 4f5c69369d7..4f5c69369d7 100644 --- a/bgfx/chains/super-xbr-6p.json +++ b/bgfx/chains/xbr/super-xbr-6p.json diff --git a/bgfx/chains/super-xbr-deposterize.json b/bgfx/chains/xbr/super-xbr-deposterize.json index 8eac3770465..8eac3770465 100644 --- a/bgfx/chains/super-xbr-deposterize.json +++ b/bgfx/chains/xbr/super-xbr-deposterize.json diff --git a/bgfx/chains/super-xbr-fast-3p.json b/bgfx/chains/xbr/super-xbr-fast-3p.json index f0d0411acc0..f0d0411acc0 100644 --- a/bgfx/chains/super-xbr-fast-3p.json +++ b/bgfx/chains/xbr/super-xbr-fast-3p.json diff --git a/bgfx/chains/super-xbr-fast-6p.json b/bgfx/chains/xbr/super-xbr-fast-6p.json index 6d19e28f9b2..6d19e28f9b2 100644 --- a/bgfx/chains/super-xbr-fast-6p.json +++ b/bgfx/chains/xbr/super-xbr-fast-6p.json diff --git a/bgfx/chains/xbr/xbr-hybrid.json b/bgfx/chains/xbr/xbr-hybrid.json new file mode 100644 index 00000000000..4529f829423 --- /dev/null +++ b/bgfx/chains/xbr/xbr-hybrid.json @@ -0,0 +1,48 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +{ + "name": "2xBR v3.7c+ReverseAA (squared)", + "author": "Hyllian", + "targets": [ + { + "name": "pass0", + "mode": "guest", + "scale": 2, + "bilinear": true, + "doublebuffer": true + }, + { + "name": "pass1", + "mode": "guest", + "scale": 4, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-hybrid/2xbr-hybrid-v4b", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "pass0" + }, + { + "effect": "xbr/xbr-hybrid/2xbr-hybrid-v4b", + "name": "Pass 1", + "input": [ + { "sampler": "decal", "target": "pass0" } + ], + "output": "pass1" + }, + { + "effect": "misc/blit", + "name": "Upscale", + "input": [ + { "sampler": "s_tex", "target": "pass1" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv1-noblend.json b/bgfx/chains/xbr/xbr-lv1-noblend.json new file mode 100644 index 00000000000..f5353a0b6b6 --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv1-noblend.json @@ -0,0 +1,42 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv1-noblend Shader + + Copyright (C) 2011-2014 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "name": "xBR-lv1 No Blend", + "author": "Hyllian", + "passes": [ + { + "effect": "xbr/xbr-lv1-noblend", + "name": "Main Pass", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2-3d.json b/bgfx/chains/xbr/xbr-lv2-3d.json new file mode 100644 index 00000000000..7403b3e5b1a --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2-3d.json @@ -0,0 +1,42 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-3d Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "name": "xBR-lv2-3d", + "author": "Hyllian", + "passes": [ + { + "effect": "xbr/xbr-lv2-3d", + "name": "Main Pass", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2-accuracy-multipass.json b/bgfx/chains/xbr/xbr-lv2-accuracy-multipass.json new file mode 100644 index 00000000000..772703ec9eb --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2-accuracy-multipass.json @@ -0,0 +1,59 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 Accuracy + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +{ + "name": "xBR-lv2 Accuracy", + "author": "Hyllian", + "targets": [ + { + "name": "internal", + "mode": "guest", + "bilinear": false, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass0", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "internal" + }, + { + "effect": "xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass1", + "name": "Pass 1", + "input": [ + { "sampler": "decal", "target": "internal" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2-accuracy-smart-blur.json b/bgfx/chains/xbr/xbr-lv2-accuracy-smart-blur.json new file mode 100644 index 00000000000..d37d687f7a0 --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2-accuracy-smart-blur.json @@ -0,0 +1,47 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +{ + "name": "xBR-lv2 Accuracy w/ Smart Blur", + "author": "Hyllian", + "targets": [ + { + "name": "internal", + "mode": "guest", + "bilinear": false, + "doublebuffer": true + }, + { + "name": "native", + "mode": "native", + "bilinear": true, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass0", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "internal" + }, + { + "effect": "xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass1", + "name": "Pass 1", + "input": [ + { "sampler": "decal", "target": "internal" } + ], + "output": "native" + }, + { + "effect": "blurs/smart-blur", + "name": "Blur Pass", + "input": [ + { "sampler": "s_p", "target": "native" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2-deposterize.json b/bgfx/chains/xbr/xbr-lv2-deposterize.json new file mode 100644 index 00000000000..38b6fabd501 --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2-deposterize.json @@ -0,0 +1,41 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +{ + "name": "xBR-lv2 w/ Deposterize", + "author": "Hyllian", + "targets": [ + { + "name": "deposterize", + "mode": "guest", + "bilinear": false, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "misc/deposterize-pass0", + "name": "Deposterize, Pass 0", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "deposterize" + }, + { + "effect": "misc/deposterize-pass1", + "name": "Deposterize, Pass 1", + "input": [ + { "sampler": "decal", "target": "deposterize" } + ], + "output": "deposterize" + }, + { + "effect": "xbr/xbr-lv2", + "name": "xBR LV2 pass", + "input": [ + { "sampler": "decal", "target": "deposterize" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2-fast.json b/bgfx/chains/xbr/xbr-lv2-fast.json new file mode 100644 index 00000000000..b3b3a1e5141 --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2-fast.json @@ -0,0 +1,57 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-fast Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "name": "xBR-lv2 Fast", + "author": "Hyllian", + "targets": [ + { + "name": "internal", + "mode": "guest", + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-lv2-fast", + "name": "Main Pass", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "internal" + }, + { + "effect": "misc/blit", + "name": "Upscale", + "input": [ + { "sampler": "s_tex", "target": "internal" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2-multipass.json b/bgfx/chains/xbr/xbr-lv2-multipass.json new file mode 100644 index 00000000000..8876bbdde9b --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2-multipass.json @@ -0,0 +1,60 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 C (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +{ + "name": "xBR-lv2 Multipass", + "author": "Hyllian", + "targets": [ + { + "name": "internal", + "mode": "guest", + "bilinear": false, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-lv2-multipass/xbr-lv2-c-pass0", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "internal" + }, + { + "effect": "xbr/xbr-lv2-multipass/xbr-lv2-pass1", + "name": "Pass 1", + "input": [ + { "sampler": "decal", "target": "internal" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2-noblend.json b/bgfx/chains/xbr/xbr-lv2-noblend.json new file mode 100644 index 00000000000..6d8a70d9351 --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2-noblend.json @@ -0,0 +1,57 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-noblend Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "name": "xBR-lv2 No Blend", + "author": "Hyllian", + "targets": [ + { + "name": "internal", + "mode": "guest", + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-lv2-noblend", + "name": "Main Pass", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "internal" + }, + { + "effect": "misc/blit", + "name": "Upscale", + "input": [ + { "sampler": "s_tex", "target": "internal" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv2.json b/bgfx/chains/xbr/xbr-lv2.json new file mode 100644 index 00000000000..0b821dd82a3 --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv2.json @@ -0,0 +1,57 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2 Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "name": "xBR-lv2", + "author": "Hyllian", + "targets": [ + { + "name": "internal", + "mode": "guest", + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-lv2", + "name": "Main Pass", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "internal" + }, + { + "effect": "misc/blit", + "name": "Upscale", + "input": [ + { "sampler": "s_tex", "target": "internal" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv3-multipass.json b/bgfx/chains/xbr/xbr-lv3-multipass.json new file mode 100644 index 00000000000..801ffff34da --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv3-multipass.json @@ -0,0 +1,60 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR level 3 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +{ + "name": "xBR-lv3 Multipass", + "author": "Hyllian", + "targets": [ + { + "name": "internal", + "mode": "guest", + "bilinear": false, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-lv3-multipass/xbr-lv3-pass0", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "internal" + }, + { + "effect": "xbr/xbr-lv3-multipass/xbr-lv3-pass1", + "name": "Pass 1", + "input": [ + { "sampler": "decal", "target": "internal" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv3-noblend.json b/bgfx/chains/xbr/xbr-lv3-noblend.json new file mode 100644 index 00000000000..eedfab7217d --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv3-noblend.json @@ -0,0 +1,42 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3-noblend - Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "name": "xBR-lv3 No Blend", + "author": "Hyllian", + "passes": [ + { + "effect": "xbr/xbr-lv3-noblend", + "name": "Main Pass", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-lv3.json b/bgfx/chains/xbr/xbr-lv3.json new file mode 100644 index 00000000000..6d6046e9712 --- /dev/null +++ b/bgfx/chains/xbr/xbr-lv3.json @@ -0,0 +1,42 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "name": "xBR-lv3", + "author": "Hyllian", + "passes": [ + { + "effect": "xbr/xbr-lv3", + "name": "Main Pass", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-mlv4-dilation.json b/bgfx/chains/xbr/xbr-mlv4-dilation.json new file mode 100644 index 00000000000..a3dfd50e912 --- /dev/null +++ b/bgfx/chains/xbr/xbr-mlv4-dilation.json @@ -0,0 +1,98 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR MultiLevel4 Shader + Dilation + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +{ + "name": "xBR-mlv4 Multipass + Dilation", + "author": "Hyllian", + "targets": [ + { + "name": "pass12", + "mode": "guest", + "bilinear": false, + "doublebuffer": true + }, + { + "name": "pass3", + "mode": "guest", + "bilinear": false, + "scale": 2, + "doublebuffer": true + }, + { + "name": "pass4", + "mode": "guest", + "bilinear": false, + "scale": 3, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass1", + "name": "Pass 1", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "pass12" + }, + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass2", + "name": "Pass 2", + "input": [ + { "sampler": "decal", "target": "pass12" } + ], + "output": "pass12" + }, + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass3", + "name": "Pass 3", + "input": [ + { "sampler": "decal", "target": "pass12" } + ], + "output": "pass3" + }, + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass4", + "name": "Pass 4", + "input": [ + { "sampler": "decal", "target": "pass3" } + ], + "output": "pass4" + }, + { + "effect": "warp/dilation-horizontal-fast", + "name": "Horizontal Dilation", + "input": [ + { "sampler": "decal", "target": "pass4" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/chains/xbr/xbr-mlv4-multipass.json b/bgfx/chains/xbr/xbr-mlv4-multipass.json new file mode 100644 index 00000000000..decb4db3ec2 --- /dev/null +++ b/bgfx/chains/xbr/xbr-mlv4-multipass.json @@ -0,0 +1,83 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR MultiLevel4 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +{ + "name": "xBR-mlv4 Multipass", + "author": "Hyllian", + "targets": [ + { + "name": "pass12", + "mode": "guest", + "bilinear": false, + "doublebuffer": true + }, + { + "name": "pass3", + "mode": "guest", + "bilinear": false, + "scale": 2, + "doublebuffer": true + } + ], + "passes": [ + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass1", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "texture": "screen" } + ], + "output": "pass12" + }, + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass2", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "target": "pass12" } + ], + "output": "pass12" + }, + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass3", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "target": "pass12" } + ], + "output": "pass3" + }, + { + "effect": "xbr/xbr-mlv4-multipass/xbr-mlv4-pass4", + "name": "Pass 0", + "input": [ + { "sampler": "decal", "target": "pass3" } + ], + "output": "output" + } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/blurs/smart-blur.json b/bgfx/effects/blurs/smart-blur.json new file mode 100644 index 00000000000..01632204b73 --- /dev/null +++ b/bgfx/effects/blurs/smart-blur.json @@ -0,0 +1,55 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian Smart-Blur Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/blurs/vs_smart-blur", + "fragment": "chains/blurs/fs_smart-blur", + "uniforms": [ + { "name": "s_p", "type": "int", "values": [ 1.0 ] }, + { "name": "SB_THRESHOLD", "type": "vec4", "values": [ 0.2, 0.2, 0.2, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/supereagle/supereagle.json b/bgfx/effects/eagle/supereagle.json index 03f40691751..cd209b7cd80 100644 --- a/bgfx/effects/supereagle/supereagle.json +++ b/bgfx/effects/eagle/supereagle.json @@ -25,8 +25,8 @@ "rgb": true, "alpha": true }, - "vertex": "chains/supereagle/vs_eagle", - "fragment": "chains/supereagle/fs_eagle", + "vertex": "chains/eagle/vs_eagle", + "fragment": "chains/eagle/fs_eagle", "uniforms": [ { "name": "decal", "type": "int", "values": [ 1.0 ] }, { "name": "LUT", "type": "int", "values": [ 1.0 ] }, diff --git a/bgfx/effects/hq2x/hq2x.json b/bgfx/effects/hqx/hq2x.json index 9b67b562b02..267339da988 100644 --- a/bgfx/effects/hq2x/hq2x.json +++ b/bgfx/effects/hqx/hq2x.json @@ -19,8 +19,8 @@ "rgb": true, "alpha": true }, - "vertex": "chains/hq2x/vs_hq2x", - "fragment": "chains/hq2x/fs_hq2x", + "vertex": "chains/hqx/vs_hq2x", + "fragment": "chains/hqx/fs_hq2x", "uniforms": [ { "name": "decal", "type": "int", "values": [ 1.0 ] }, { "name": "LUT", "type": "int", "values": [ 1.0 ] }, diff --git a/bgfx/effects/hq3x/hq3x.json b/bgfx/effects/hqx/hq3x.json index 4cc61706dce..15fa50517a3 100644 --- a/bgfx/effects/hq3x/hq3x.json +++ b/bgfx/effects/hqx/hq3x.json @@ -19,8 +19,8 @@ "rgb": true, "alpha": true }, - "vertex": "chains/hq3x/vs_hq3x", - "fragment": "chains/hq3x/fs_hq3x", + "vertex": "chains/hqx/vs_hq3x", + "fragment": "chains/hqx/fs_hq3x", "uniforms": [ { "name": "decal", "type": "int", "values": [ 1.0 ] }, { "name": "LUT", "type": "int", "values": [ 1.0 ] }, diff --git a/bgfx/effects/hq4x/hq4x.json b/bgfx/effects/hqx/hq4x.json index 8d2221896ce..a2e61b3ae09 100644 --- a/bgfx/effects/hq4x/hq4x.json +++ b/bgfx/effects/hqx/hq4x.json @@ -19,8 +19,8 @@ "rgb": true, "alpha": true }, - "vertex": "chains/hq4x/vs_hq4x", - "fragment": "chains/hq4x/fs_hq4x", + "vertex": "chains/hqx/vs_hq4x", + "fragment": "chains/hqx/fs_hq4x", "uniforms": [ { "name": "decal", "type": "int", "values": [ 1.0 ] }, { "name": "LUT", "type": "int", "values": [ 1.0 ] }, diff --git a/bgfx/effects/supereagle/blit.json b/bgfx/effects/supereagle/blit.json deleted file mode 100644 index 24c3acf5a5d..00000000000 --- a/bgfx/effects/supereagle/blit.json +++ /dev/null @@ -1,121 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Ryan Holtz -//============================================================ -// -// blit.json: A simple texture-to-target copy. -// -//============================================================ -{ - // blend (required): The blend state for this effect. - "blend": { - // equation (optional): What equation to perform on the source and destination blend values. - // values: "add", "sub", "revSub", "min", "max" - // default: "add" - // - // "subtract" and "revSubtract" are provided as aliases for "sub" and "revSub" - "equation": "add", - - // blend function parameters (optional): What factors to use in the blend function when calculating the final pixel. - // values: "0", "1", "srccolor", "1-srccolor", "dstcolor", "1-dstcolor", "srcalpha", "1-srcalpha", "dstalpha", "1-dstalpha" - // defaults (srcColor, srcAlpha): "1" - // defaults (dstColor, dstAlpha): "0" - // - // "zero", "one", "invsrccolor", "invdstcolor", "invsrcalpha", and "invdstalpha" are provided as aliases for "0", "1", "1-srccolor", "1-dstcolor", "1-srcalpha", and "1-dstalpha" - "srcColor": "srcalpha", - "dstColor": "1-srcalpha", - "srcAlpha": "srcalpha", - "dstAlpha": "1-srcalpha" - }, - - // depth (required): The depth state for this effect. - "depth": { - // function (optional): The depth function to use when drawing. - // values: "never", "less", "equal", "lequal", "greater", "notequal", "gequal", "always" - // default: "always" - "function": "always", - - // writeenable (optional): Whether to store Z-buffer data. - // values: true, false - // default: false - "writeenable": false - }, - - // cull (required): The cull mode for this effect. - "cull": { - // mode (optional): What winding, if any, to cull. - // values: "none", "cw", "ccw" - // default: "ccw" - // - // "clockwise" and "counterclockwise" are provided as aliases for "cw" and "ccw" - "mode": "none" - }, - - // write (required): Write enable for color and alpha channels. - "write": { - // rgb (optional): Whether to store color data when drawing. - // values: true, false - // default: false - "rgb": true, - - // alpha (optional): Whether to store alpha data when drawing. - // values: true, false - // default: false - "alpha": true - }, - - // vertex (required): The vertex shader to use when drawing. - // value: A string containing the path and name of a shader file to use, minus the extension. - "vertex": "chains/supereagle/vs_blit", - - // pixel/fragment (required): The pixel or fragment shader to use when drawing. - // value: A string containing the path and name of a shader file to use, minus the extension. - "fragment": "chains/supereagle/fs_blit", - - // uniforms (required): The list of uniforms for this effect. Can be empty, but must exist. - "uniforms": [ - { - // name (required): The name of the uniform, as used in either the vertex or pixel/fragment shader. - // value: A string containing the name of the uniform as described above. - // - // NOTE: Some names correspond to special values that will be automatically filled by the BGFX - // code if they are used by the shader. These names are: - // "u_screen_dims" - // The dimensions of the first texture input if present, otherwise the dimensions of the output window. - // Valid values: xy - // "u_inv_screen_dims" - // The reciprocal of u_screen_dims. - // Valid values: xy - // "u_source_dims" - // The size, in pixels, of the screen texture incoming to the chain. - // Valid values: xy - // "u_rotation_type" - // This screen's rotation type. 0 if ROT0, 1 if ROT90, 2 if ROT180, 3 of ROT270. - // Valid values: x - // "u_swap_xy" - // Whether this screen is swapped on the X and Y axes. 1 if true, 0 if false. - // Valid values: x - // "u_quad_dims" - // The dimensions, in pixels, occupied by this one screen primitive itself in the output window. - // Valid values: xy - // "u_tex_sizeN" - // The dimensions, in pixels, of the texture in input pair N. Starts at 0. - // valid values: xy - "name": "s_tex", - - // type (required): The type of the uniform. - // values: "int", "vec4", "mat3", "mat4" - // - // Note: "int" should only be used for samplers. - "type": "int", - - // values (required): The array of numbers with which to initialize the uniform. - // value: A JSON array containin the correct amount of numbers to initialize a uniform of the - // above-specified type. The following size rules should be followed: - // "int": 1 float - // "vec4": 4 floats - // "mat3": 9 floats - // "mat4": 16 floats - "values": [ 1.0 ] - } - ] -}
\ No newline at end of file diff --git a/bgfx/effects/warp/dilation-horizontal-fast.json b/bgfx/effects/warp/dilation-horizontal-fast.json new file mode 100644 index 00000000000..083b07edecd --- /dev/null +++ b/bgfx/effects/warp/dilation-horizontal-fast.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's dilation-horizontal-fast Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/warp/vs_dilation-horizontal-fast", + "fragment": "chains/warp/fs_dilation-horizontal-fast", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-sharp.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-sharp.json new file mode 100644 index 00000000000..8015f3a3ca2 --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-sharp.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v2-gamma.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v2-gamma.json new file mode 100644 index 00000000000..3a30413f703 --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v2-gamma.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta1 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v2.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v2.json new file mode 100644 index 00000000000..3045dbd65b2 --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v2.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - Dithering preserved + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4-gamma.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4-gamma.json new file mode 100644 index 00000000000..2a285ea176c --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4-gamma.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4.json new file mode 100644 index 00000000000..961fee7922a --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - v4 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4b.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4b.json new file mode 100644 index 00000000000..e5c5e18c18f --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v4b.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8b+ReverseAA (semi-rounded) Shader - v4 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v5-gamma.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v5-gamma.json new file mode 100644 index 00000000000..38abe1e0d0b --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid-v5-gamma.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid.json b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid.json new file mode 100644 index 00000000000..b23528caafd --- /dev/null +++ b/bgfx/effects/xbr/xbr-hybrid/2xbr-hybrid.json @@ -0,0 +1,35 @@ +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-hybrid/vs_2xbr-hybrid", + "fragment": "chains/xbr/xbr-hybrid/fs_2xbr-hybrid", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv1-noblend.json b/bgfx/effects/xbr/xbr-lv1-noblend.json new file mode 100644 index 00000000000..8bca60452e6 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv1-noblend.json @@ -0,0 +1,56 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv1-noblend Shader + + Copyright (C) 2011-2014 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/vs_xbr-lv1-noblend", + "fragment": "chains/xbr/fs_xbr-lv1-noblend", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_Y_WEIGHT", "type": "vec4", "values": [ 48.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 15.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-3d.json b/bgfx/effects/xbr/xbr-lv2-3d.json new file mode 100644 index 00000000000..e4b6146ed2a --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-3d.json @@ -0,0 +1,60 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-3d Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/vs_xbr-lv2-3d", + "fragment": "chains/xbr/fs_xbr-lv2-3d", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_SCALE", "type": "vec4", "values": [ 3.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_Y_WEIGHT", "type": "vec4", "values": [ 48.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 15.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV1_COEFFICIENT", "type": "vec4", "values": [ 0.5, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV2_COEFFICIENT", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_RES", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-fast.json b/bgfx/effects/xbr/xbr-lv2-fast.json new file mode 100644 index 00000000000..e3ce6fb1f4c --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-fast.json @@ -0,0 +1,58 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-lq Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/vs_xbr-lv2-fast", + "fragment": "chains/xbr/fs_xbr-lv2-fast", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_SCALE", "type": "vec4", "values": [ 4.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_Y_WEIGHT", "type": "vec4", "values": [ 48.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 25.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV2_COEFFICIENT", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-a-pass0.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-a-pass0.json new file mode 100644 index 00000000000..f77141d0128 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-a-pass0.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 A (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass0.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass0.json new file mode 100644 index 00000000000..809ec9cc5d6 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass0.json @@ -0,0 +1,56 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 Accuracy - pass0 Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 4.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV2_COEFFICIENT", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass1.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass1.json new file mode 100644 index 00000000000..06dc01021a5 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-accuracy-pass1.json @@ -0,0 +1,57 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 Accuracy - pass0 Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "ORIG_texture", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_SCALE", "type": "vec4", "values": [ 4.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_tex_size1", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-b-pass0.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-b-pass0.json new file mode 100644 index 00000000000..8ba8832f545 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-b-pass0.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 A (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-c-pass0.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-c-pass0.json new file mode 100644 index 00000000000..16872129ef3 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-c-pass0.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 A (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-d-pass0.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-d-pass0.json new file mode 100644 index 00000000000..758a21b2619 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-d-pass0.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 A (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-noblend-pass1.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-noblend-pass1.json new file mode 100644 index 00000000000..f57bd18eda5 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-noblend-pass1.json @@ -0,0 +1,56 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 - noblend - pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "ORIG_texture", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_tex_size1", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-pass1.json b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-pass1.json new file mode 100644 index 00000000000..d5613e293cd --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-multipass/xbr-lv2-pass1.json @@ -0,0 +1,57 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 - pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1", + "fragment": "chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "ORIG_texture", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_tex_size1", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_target_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2-noblend.json b/bgfx/effects/xbr/xbr-lv2-noblend.json new file mode 100644 index 00000000000..41695ff888f --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2-noblend.json @@ -0,0 +1,56 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-noblend Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/vs_xbr-lv2-noblend", + "fragment": "chains/xbr/fs_xbr-lv2-noblend", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 0.6, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV2_COEFFICIENT", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv2.json b/bgfx/effects/xbr/xbr-lv2.json new file mode 100644 index 00000000000..58e451ddeca --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv2.json @@ -0,0 +1,58 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2 Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/vs_xbr-lv2", + "fragment": "chains/xbr/fs_xbr-lv2", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_SCALE", "type": "vec4", "values": [ 4.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_Y_WEIGHT", "type": "vec4", "values": [ 48.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 25.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV2_COEFFICIENT", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv3-multipass/xbr-lv3-pass0.json b/bgfx/effects/xbr/xbr-lv3-multipass/xbr-lv3-pass0.json new file mode 100644 index 00000000000..39daf68c665 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv3-multipass/xbr-lv3-pass0.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR level 3 pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0", + "fragment": "chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv3-multipass/xbr-lv3-pass1.json b/bgfx/effects/xbr/xbr-lv3-multipass/xbr-lv3-pass1.json new file mode 100644 index 00000000000..04afb26b417 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv3-multipass/xbr-lv3-pass1.json @@ -0,0 +1,57 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR level 3 pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1", + "fragment": "chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "ORIG_texture", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_tex_size1", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_target_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv3-noblend.json b/bgfx/effects/xbr/xbr-lv3-noblend.json new file mode 100644 index 00000000000..8a2965646c9 --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv3-noblend.json @@ -0,0 +1,58 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3-noblend - Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/vs_xbr-lv3-noblend", + "fragment": "chains/xbr/fs_xbr-lv3-noblend", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 10.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_EQ_THRESHOLD2", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV2_COEFFICIENT", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-lv3.json b/bgfx/effects/xbr/xbr-lv3.json new file mode 100644 index 00000000000..bcbf6e1f48b --- /dev/null +++ b/bgfx/effects/xbr/xbr-lv3.json @@ -0,0 +1,62 @@ +// license:MIT +// copyright-holders:Hyllian + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/vs_xbr-lv3", + "fragment": "chains/xbr/fs_xbr-lv3", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "XBR_Y_WEIGHT", "type": "vec4", "values": [ 48.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_EQ_THRESHOLD", "type": "vec4", "values": [ 10.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_EQ_THRESHOLD2", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "XBR_LV2_COEFFICIENT", "type": "vec4", "values": [ 2.0, 0.0, 0.0, 0.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass1.json b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass1.json new file mode 100644 index 00000000000..fd313a73eca --- /dev/null +++ b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass1.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR MultiLevel4 Shader - Pass1 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1", + "fragment": "chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass2.json b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass2.json new file mode 100644 index 00000000000..8d25c90ed0f --- /dev/null +++ b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass2.json @@ -0,0 +1,54 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR MultiLevel4 Shader - Pass2 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2", + "fragment": "chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size0", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass3.json b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass3.json new file mode 100644 index 00000000000..7e862e66664 --- /dev/null +++ b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass3.json @@ -0,0 +1,55 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR MultiLevel4 Shader - Pass3 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3", + "fragment": "chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "ORIG_texture", "type": "int", "values": [ 1.0 ] }, + { "name": "u_tex_size1", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass4.json b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass4.json new file mode 100644 index 00000000000..7323c3b8960 --- /dev/null +++ b/bgfx/effects/xbr/xbr-mlv4-multipass/xbr-mlv4-pass4.json @@ -0,0 +1,56 @@ +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR MultiLevel4 Shader - Pass4 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +{ + "blend": { + "equation": "add", + "srcColor": "1", + "dstColor": "0", + "srcAlpha": "1", + "dstAlpha": "0" + }, + "depth": { + "function": "always", + "writeenable": false + }, + "cull": { + "mode": "none" + }, + "write": { + "rgb": true, + "alpha": true + }, + "vertex": "chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4", + "fragment": "chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4", + "uniforms": [ + { "name": "decal", "type": "int", "values": [ 1.0 ] }, + { "name": "ORIG_texture", "type": "int", "values": [ 1.0 ] }, + { "name": "u_target_size", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_tex_size1", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] } + ] +}
\ No newline at end of file diff --git a/bgfx/shaders/dx11/chains/blurs/fs_smart-blur.bin b/bgfx/shaders/dx11/chains/blurs/fs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..a7bb984a12a --- /dev/null +++ b/bgfx/shaders/dx11/chains/blurs/fs_smart-blur.bin diff --git a/bgfx/shaders/dx11/chains/hq2x/vs_hq2x.bin b/bgfx/shaders/dx11/chains/blurs/vs_smart-blur.bin Binary files differindex 5b037b2bfe8..5b037b2bfe8 100644 --- a/bgfx/shaders/dx11/chains/hq2x/vs_hq2x.bin +++ b/bgfx/shaders/dx11/chains/blurs/vs_smart-blur.bin diff --git a/bgfx/shaders/dx11/chains/supereagle/fs_eagle.bin b/bgfx/shaders/dx11/chains/eagle/fs_eagle.bin Binary files differindex 085fbc010d6..085fbc010d6 100644 --- a/bgfx/shaders/dx11/chains/supereagle/fs_eagle.bin +++ b/bgfx/shaders/dx11/chains/eagle/fs_eagle.bin diff --git a/bgfx/shaders/dx11/chains/supereagle/vs_eagle.bin b/bgfx/shaders/dx11/chains/eagle/vs_eagle.bin Binary files differindex d4773f1abdf..d4773f1abdf 100644 --- a/bgfx/shaders/dx11/chains/supereagle/vs_eagle.bin +++ b/bgfx/shaders/dx11/chains/eagle/vs_eagle.bin diff --git a/bgfx/shaders/dx11/chains/hq2x/fs_hq2x.bin b/bgfx/shaders/dx11/chains/hqx/fs_hq2x.bin Binary files differindex cdce652045f..cdce652045f 100644 --- a/bgfx/shaders/dx11/chains/hq2x/fs_hq2x.bin +++ b/bgfx/shaders/dx11/chains/hqx/fs_hq2x.bin diff --git a/bgfx/shaders/dx11/chains/hq3x/fs_hq3x.bin b/bgfx/shaders/dx11/chains/hqx/fs_hq3x.bin Binary files differindex 29d6a5c2c3d..29d6a5c2c3d 100644 --- a/bgfx/shaders/dx11/chains/hq3x/fs_hq3x.bin +++ b/bgfx/shaders/dx11/chains/hqx/fs_hq3x.bin diff --git a/bgfx/shaders/dx11/chains/hq4x/fs_hq4x.bin b/bgfx/shaders/dx11/chains/hqx/fs_hq4x.bin Binary files differindex 7ebeaab6cd7..7ebeaab6cd7 100644 --- a/bgfx/shaders/dx11/chains/hq4x/fs_hq4x.bin +++ b/bgfx/shaders/dx11/chains/hqx/fs_hq4x.bin diff --git a/bgfx/shaders/dx11/chains/hq3x/vs_hq3x.bin b/bgfx/shaders/dx11/chains/hqx/vs_hq2x.bin Binary files differindex 5b037b2bfe8..5b037b2bfe8 100644 --- a/bgfx/shaders/dx11/chains/hq3x/vs_hq3x.bin +++ b/bgfx/shaders/dx11/chains/hqx/vs_hq2x.bin diff --git a/bgfx/shaders/dx11/chains/hq4x/vs_hq4x.bin b/bgfx/shaders/dx11/chains/hqx/vs_hq3x.bin Binary files differindex 5b037b2bfe8..5b037b2bfe8 100644 --- a/bgfx/shaders/dx11/chains/hq4x/vs_hq4x.bin +++ b/bgfx/shaders/dx11/chains/hqx/vs_hq3x.bin diff --git a/bgfx/shaders/dx11/chains/hqx/vs_hq4x.bin b/bgfx/shaders/dx11/chains/hqx/vs_hq4x.bin Binary files differnew file mode 100644 index 00000000000..5b037b2bfe8 --- /dev/null +++ b/bgfx/shaders/dx11/chains/hqx/vs_hq4x.bin diff --git a/bgfx/shaders/dx11/chains/super-4xbr-3d-4p/fs_blit.bin b/bgfx/shaders/dx11/chains/super-4xbr-3d-4p/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/super-4xbr-3d-4p/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/super-4xbr-3d-4p/vs_blit.bin b/bgfx/shaders/dx11/chains/super-4xbr-3d-4p/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/super-4xbr-3d-4p/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/super-4xbr-3d-6p-smoother/fs_blit.bin b/bgfx/shaders/dx11/chains/super-4xbr-3d-6p-smoother/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/super-4xbr-3d-6p-smoother/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/super-4xbr-3d-6p-smoother/vs_blit.bin b/bgfx/shaders/dx11/chains/super-4xbr-3d-6p-smoother/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/super-4xbr-3d-6p-smoother/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/supereagle/fs_blit.bin b/bgfx/shaders/dx11/chains/supereagle/fs_blit.bin Binary files differdeleted file mode 100644 index 7b633fde6ed..00000000000 --- a/bgfx/shaders/dx11/chains/supereagle/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/supereagle/vs_blit.bin b/bgfx/shaders/dx11/chains/supereagle/vs_blit.bin Binary files differdeleted file mode 100644 index 8ca25c11eae..00000000000 --- a/bgfx/shaders/dx11/chains/supereagle/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/warp/fs_dilation-horizontal-fast.bin b/bgfx/shaders/dx11/chains/warp/fs_dilation-horizontal-fast.bin Binary files differnew file mode 100644 index 00000000000..b3315773ebb --- /dev/null +++ b/bgfx/shaders/dx11/chains/warp/fs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/dx11/chains/warp/vs_dilation-horizontal-fast.bin b/bgfx/shaders/dx11/chains/warp/vs_dilation-horizontal-fast.bin Binary files differnew file mode 100644 index 00000000000..40d4899cda1 --- /dev/null +++ b/bgfx/shaders/dx11/chains/warp/vs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/dx11/chains/xbr-hybrid/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-hybrid/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-hybrid/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-hybrid/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-hybrid/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-hybrid/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv1-noblend/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv1-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv1-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv1-noblend/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv1-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv1-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-3d/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-3d/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-3d/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-3d/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-3d/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-3d/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-multipass/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-multipass/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-deposterize/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-deposterize/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-deposterize/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-deposterize/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-deposterize/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-deposterize/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-fast/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-fast/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-fast/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-fast/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-fast/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-fast/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-multipass/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-multipass/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-noblend/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv2-noblend/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv2-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv2-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv3-multipass/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv3-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv3-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv3-multipass/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv3-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv3-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv3-noblend/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv3-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv3-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv3-noblend/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv3-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv3-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv3/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv3/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv3/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-lv3/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-lv3/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-lv3/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-mlv4-dilation/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-mlv4-dilation/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-mlv4-dilation/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-mlv4-dilation/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-mlv4-dilation/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-mlv4-dilation/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-mlv4-multipass/fs_blit.bin b/bgfx/shaders/dx11/chains/xbr-mlv4-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 80d85fb1107..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-mlv4-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr-mlv4-multipass/vs_blit.bin b/bgfx/shaders/dx11/chains/xbr-mlv4-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index b0bebf9da4c..00000000000 --- a/bgfx/shaders/dx11/chains/xbr-mlv4-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv2-noblend.bin b/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..3b72deb8782 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv3-noblend.bin b/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..3b4f0db46a3 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv3.bin b/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..e2cebba1f67 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/fs_xbr-lv3.bin diff --git a/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv2-noblend.bin b/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv3-noblend.bin b/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv3.bin b/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/vs_xbr-lv3.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..6149394b1cd --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..c69cdcbb1ae --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..464db7ce0ed --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..565ff37ece7 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..58488796cd8 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..c54807facf3 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..217f7202faa --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..846d9599139 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..13e720c9264 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..de6b1c2efc1 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..72dd22dd336 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..50419be6c4b --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..0ac5f18d87a --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..ecfab5f3203 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..dde6ea10a5c --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..59510dfd4d9 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..3002f050eca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..3002f050eca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..3002f050eca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..7d83dba6a69 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..0dec7034df8 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..862b9eb121a --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin Binary files differnew file mode 100644 index 00000000000..28df089c632 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..b71d06f700f --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin Binary files differnew file mode 100644 index 00000000000..7301c4ed418 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin Binary files differnew file mode 100644 index 00000000000..dd768fbf3b5 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin Binary files differnew file mode 100644 index 00000000000..e31a9926885 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..f4fe0e66cca --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin Binary files differnew file mode 100644 index 00000000000..580b2536471 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin Binary files differnew file mode 100644 index 00000000000..580b2536471 --- /dev/null +++ b/bgfx/shaders/dx11/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/dx9/chains/blurs/fs_smart-blur.bin b/bgfx/shaders/dx9/chains/blurs/fs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..c9c91235392 --- /dev/null +++ b/bgfx/shaders/dx9/chains/blurs/fs_smart-blur.bin diff --git a/bgfx/shaders/dx9/chains/hq2x/vs_hq2x.bin b/bgfx/shaders/dx9/chains/blurs/vs_smart-blur.bin Binary files differindex de5213e137f..de5213e137f 100644 --- a/bgfx/shaders/dx9/chains/hq2x/vs_hq2x.bin +++ b/bgfx/shaders/dx9/chains/blurs/vs_smart-blur.bin diff --git a/bgfx/shaders/dx9/chains/supereagle/fs_eagle.bin b/bgfx/shaders/dx9/chains/eagle/fs_eagle.bin Binary files differindex 7f099756105..7f099756105 100644 --- a/bgfx/shaders/dx9/chains/supereagle/fs_eagle.bin +++ b/bgfx/shaders/dx9/chains/eagle/fs_eagle.bin diff --git a/bgfx/shaders/dx9/chains/supereagle/vs_eagle.bin b/bgfx/shaders/dx9/chains/eagle/vs_eagle.bin Binary files differindex 6bf98d22532..6bf98d22532 100644 --- a/bgfx/shaders/dx9/chains/supereagle/vs_eagle.bin +++ b/bgfx/shaders/dx9/chains/eagle/vs_eagle.bin diff --git a/bgfx/shaders/dx9/chains/hq2x/fs_hq2x.bin b/bgfx/shaders/dx9/chains/hqx/fs_hq2x.bin Binary files differindex 7bebafd9962..7bebafd9962 100644 --- a/bgfx/shaders/dx9/chains/hq2x/fs_hq2x.bin +++ b/bgfx/shaders/dx9/chains/hqx/fs_hq2x.bin diff --git a/bgfx/shaders/dx9/chains/hq3x/fs_hq3x.bin b/bgfx/shaders/dx9/chains/hqx/fs_hq3x.bin Binary files differindex 6151be64f23..6151be64f23 100644 --- a/bgfx/shaders/dx9/chains/hq3x/fs_hq3x.bin +++ b/bgfx/shaders/dx9/chains/hqx/fs_hq3x.bin diff --git a/bgfx/shaders/dx9/chains/hq4x/fs_hq4x.bin b/bgfx/shaders/dx9/chains/hqx/fs_hq4x.bin Binary files differindex 55d09ab2827..55d09ab2827 100644 --- a/bgfx/shaders/dx9/chains/hq4x/fs_hq4x.bin +++ b/bgfx/shaders/dx9/chains/hqx/fs_hq4x.bin diff --git a/bgfx/shaders/dx9/chains/hq3x/vs_hq3x.bin b/bgfx/shaders/dx9/chains/hqx/vs_hq2x.bin Binary files differindex de5213e137f..de5213e137f 100644 --- a/bgfx/shaders/dx9/chains/hq3x/vs_hq3x.bin +++ b/bgfx/shaders/dx9/chains/hqx/vs_hq2x.bin diff --git a/bgfx/shaders/dx9/chains/hq4x/vs_hq4x.bin b/bgfx/shaders/dx9/chains/hqx/vs_hq3x.bin Binary files differindex de5213e137f..de5213e137f 100644 --- a/bgfx/shaders/dx9/chains/hq4x/vs_hq4x.bin +++ b/bgfx/shaders/dx9/chains/hqx/vs_hq3x.bin diff --git a/bgfx/shaders/dx9/chains/hqx/vs_hq4x.bin b/bgfx/shaders/dx9/chains/hqx/vs_hq4x.bin Binary files differnew file mode 100644 index 00000000000..de5213e137f --- /dev/null +++ b/bgfx/shaders/dx9/chains/hqx/vs_hq4x.bin diff --git a/bgfx/shaders/dx9/chains/super-4xbr-3d-4p/fs_blit.bin b/bgfx/shaders/dx9/chains/super-4xbr-3d-4p/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/super-4xbr-3d-4p/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/super-4xbr-3d-4p/vs_blit.bin b/bgfx/shaders/dx9/chains/super-4xbr-3d-4p/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/super-4xbr-3d-4p/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/super-4xbr-3d-6p-smoother/fs_blit.bin b/bgfx/shaders/dx9/chains/super-4xbr-3d-6p-smoother/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/super-4xbr-3d-6p-smoother/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/super-4xbr-3d-6p-smoother/vs_blit.bin b/bgfx/shaders/dx9/chains/super-4xbr-3d-6p-smoother/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/super-4xbr-3d-6p-smoother/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/supereagle/fs_blit.bin b/bgfx/shaders/dx9/chains/supereagle/fs_blit.bin Binary files differdeleted file mode 100644 index 7db80471603..00000000000 --- a/bgfx/shaders/dx9/chains/supereagle/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/supereagle/vs_blit.bin b/bgfx/shaders/dx9/chains/supereagle/vs_blit.bin Binary files differdeleted file mode 100644 index 87ff0b96020..00000000000 --- a/bgfx/shaders/dx9/chains/supereagle/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/warp/fs_dilation-horizontal-fast.bin b/bgfx/shaders/dx9/chains/warp/fs_dilation-horizontal-fast.bin Binary files differnew file mode 100644 index 00000000000..d1b4cb47ea5 --- /dev/null +++ b/bgfx/shaders/dx9/chains/warp/fs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/dx9/chains/warp/vs_dilation-horizontal-fast.bin b/bgfx/shaders/dx9/chains/warp/vs_dilation-horizontal-fast.bin Binary files differnew file mode 100644 index 00000000000..7b02905e0fb --- /dev/null +++ b/bgfx/shaders/dx9/chains/warp/vs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/dx9/chains/xbr-hybrid/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-hybrid/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-hybrid/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-hybrid/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-hybrid/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-hybrid/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv1-noblend/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv1-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv1-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv1-noblend/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv1-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv1-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-3d/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-3d/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-3d/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-3d/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-3d/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-3d/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-multipass/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-multipass/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-deposterize/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-deposterize/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-deposterize/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-deposterize/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-deposterize/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-deposterize/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-fast/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-fast/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-fast/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-fast/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-fast/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-fast/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-multipass/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-multipass/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-noblend/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv2-noblend/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv2-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv2-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv3-multipass/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv3-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv3-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv3-multipass/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv3-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv3-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv3-noblend/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv3-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv3-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv3-noblend/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv3-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv3-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv3/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv3/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv3/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-lv3/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-lv3/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-lv3/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-mlv4-dilation/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-mlv4-dilation/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-mlv4-dilation/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-mlv4-dilation/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-mlv4-dilation/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-mlv4-dilation/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-mlv4-multipass/fs_blit.bin b/bgfx/shaders/dx9/chains/xbr-mlv4-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index ef8fa0730c3..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-mlv4-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr-mlv4-multipass/vs_blit.bin b/bgfx/shaders/dx9/chains/xbr-mlv4-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index ea94c83e62d..00000000000 --- a/bgfx/shaders/dx9/chains/xbr-mlv4-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv2-noblend.bin b/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..3e43fd1ae5c --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv3-noblend.bin b/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..d34d1a48025 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv3.bin b/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..217dff88088 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/fs_xbr-lv3.bin diff --git a/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv2-noblend.bin b/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv3-noblend.bin b/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv3.bin b/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/vs_xbr-lv3.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..74e32bffacc --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..c76166bf10a --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..abd1066c35b --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..2676fe0cc09 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..5eb65f9a32c --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..b6a0e6ce5c3 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..71b03d4f663 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..9ae18d96ba8 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..2790a5c711c --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..468f1445574 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..b310e4253ad --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..e214f705832 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..1ebc1cbfe8d --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..4062e123149 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..955a0dee2af --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..bdc3067c871 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..1f32f0408f3 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..1f32f0408f3 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..1f32f0408f3 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..5ab510f69fc --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..b1322b52e47 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..73046f14321 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin Binary files differnew file mode 100644 index 00000000000..845601063f6 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..f571926e712 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin Binary files differnew file mode 100644 index 00000000000..b63c5230085 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin Binary files differnew file mode 100644 index 00000000000..555b9dd1d80 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin Binary files differnew file mode 100644 index 00000000000..b8876ee9611 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..73a4c5231fd --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin Binary files differnew file mode 100644 index 00000000000..2ca8ce88528 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin Binary files differnew file mode 100644 index 00000000000..2ca8ce88528 --- /dev/null +++ b/bgfx/shaders/dx9/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/gles/chains/blurs/fs_smart-blur.bin b/bgfx/shaders/gles/chains/blurs/fs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..a4c15606155 --- /dev/null +++ b/bgfx/shaders/gles/chains/blurs/fs_smart-blur.bin diff --git a/bgfx/shaders/gles/chains/blurs/vs_smart-blur.bin b/bgfx/shaders/gles/chains/blurs/vs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..2d62e84953e --- /dev/null +++ b/bgfx/shaders/gles/chains/blurs/vs_smart-blur.bin diff --git a/bgfx/shaders/gles/chains/supereagle/fs_eagle.bin b/bgfx/shaders/gles/chains/eagle/fs_eagle.bin Binary files differindex 76ba019d544..76ba019d544 100644 --- a/bgfx/shaders/gles/chains/supereagle/fs_eagle.bin +++ b/bgfx/shaders/gles/chains/eagle/fs_eagle.bin diff --git a/bgfx/shaders/gles/chains/supereagle/vs_eagle.bin b/bgfx/shaders/gles/chains/eagle/vs_eagle.bin Binary files differindex a67ebb5a044..a67ebb5a044 100644 --- a/bgfx/shaders/gles/chains/supereagle/vs_eagle.bin +++ b/bgfx/shaders/gles/chains/eagle/vs_eagle.bin diff --git a/bgfx/shaders/gles/chains/hq2x/fs_hq2x.bin b/bgfx/shaders/gles/chains/hqx/fs_hq2x.bin Binary files differindex 2b008d10a52..2b008d10a52 100644 --- a/bgfx/shaders/gles/chains/hq2x/fs_hq2x.bin +++ b/bgfx/shaders/gles/chains/hqx/fs_hq2x.bin diff --git a/bgfx/shaders/gles/chains/hq3x/fs_hq3x.bin b/bgfx/shaders/gles/chains/hqx/fs_hq3x.bin Binary files differindex 7494371f7eb..7494371f7eb 100644 --- a/bgfx/shaders/gles/chains/hq3x/fs_hq3x.bin +++ b/bgfx/shaders/gles/chains/hqx/fs_hq3x.bin diff --git a/bgfx/shaders/gles/chains/hq4x/fs_hq4x.bin b/bgfx/shaders/gles/chains/hqx/fs_hq4x.bin Binary files differindex c215c28b740..c215c28b740 100644 --- a/bgfx/shaders/gles/chains/hq4x/fs_hq4x.bin +++ b/bgfx/shaders/gles/chains/hqx/fs_hq4x.bin diff --git a/bgfx/shaders/gles/chains/hq2x/vs_hq2x.bin b/bgfx/shaders/gles/chains/hqx/vs_hq2x.bin Binary files differindex 413d1e8bd20..413d1e8bd20 100644 --- a/bgfx/shaders/gles/chains/hq2x/vs_hq2x.bin +++ b/bgfx/shaders/gles/chains/hqx/vs_hq2x.bin diff --git a/bgfx/shaders/gles/chains/hq3x/vs_hq3x.bin b/bgfx/shaders/gles/chains/hqx/vs_hq3x.bin Binary files differindex 413d1e8bd20..413d1e8bd20 100644 --- a/bgfx/shaders/gles/chains/hq3x/vs_hq3x.bin +++ b/bgfx/shaders/gles/chains/hqx/vs_hq3x.bin diff --git a/bgfx/shaders/gles/chains/hq4x/vs_hq4x.bin b/bgfx/shaders/gles/chains/hqx/vs_hq4x.bin Binary files differindex 413d1e8bd20..413d1e8bd20 100644 --- a/bgfx/shaders/gles/chains/hq4x/vs_hq4x.bin +++ b/bgfx/shaders/gles/chains/hqx/vs_hq4x.bin diff --git a/bgfx/shaders/gles/chains/super-4xbr-3d-4p/fs_blit.bin b/bgfx/shaders/gles/chains/super-4xbr-3d-4p/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/super-4xbr-3d-4p/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/super-4xbr-3d-6p-smoother/fs_blit.bin b/bgfx/shaders/gles/chains/super-4xbr-3d-6p-smoother/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/super-4xbr-3d-6p-smoother/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/supereagle/fs_blit.bin b/bgfx/shaders/gles/chains/supereagle/fs_blit.bin Binary files differdeleted file mode 100644 index fab8eaf63d2..00000000000 --- a/bgfx/shaders/gles/chains/supereagle/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/supereagle/vs_blit.bin b/bgfx/shaders/gles/chains/supereagle/vs_blit.bin Binary files differdeleted file mode 100644 index 499face3174..00000000000 --- a/bgfx/shaders/gles/chains/supereagle/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/warp/fs_dilation-horizontal-fast.bin b/bgfx/shaders/gles/chains/warp/fs_dilation-horizontal-fast.bin Binary files differnew file mode 100644 index 00000000000..734573098cc --- /dev/null +++ b/bgfx/shaders/gles/chains/warp/fs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/gles/chains/super-4xbr-3d-4p/vs_blit.bin b/bgfx/shaders/gles/chains/warp/vs_dilation-horizontal-fast.bin Binary files differindex 9dd618de8a0..66384640a3b 100644 --- a/bgfx/shaders/gles/chains/super-4xbr-3d-4p/vs_blit.bin +++ b/bgfx/shaders/gles/chains/warp/vs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/gles/chains/xbr-hybrid/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-hybrid/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-hybrid/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv1-noblend/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv1-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv1-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-3d/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-3d/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-3d/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-3d/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-3d/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-3d/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-multipass/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-accuracy-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-multipass/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-accuracy-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-deposterize/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-deposterize/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-deposterize/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-deposterize/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-deposterize/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-deposterize/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-fast/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-fast/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-fast/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-fast/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-fast/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-fast/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-multipass/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-multipass/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-noblend/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv2-noblend/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv2-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv2-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv3-multipass/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv3-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv3-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv3-multipass/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv3-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv3-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv3-noblend/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv3-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv3-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv3-noblend/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv3-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv3-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv3/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv3/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv3/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-lv3/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-lv3/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-lv3/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-mlv4-dilation/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-mlv4-dilation/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-mlv4-dilation/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-mlv4-dilation/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-mlv4-dilation/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-mlv4-dilation/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-mlv4-multipass/fs_blit.bin b/bgfx/shaders/gles/chains/xbr-mlv4-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 22e2f0c23d0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-mlv4-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr-mlv4-multipass/vs_blit.bin b/bgfx/shaders/gles/chains/xbr-mlv4-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 9dd618de8a0..00000000000 --- a/bgfx/shaders/gles/chains/xbr-mlv4-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/gles/chains/xbr/fs_xbr-lv2-noblend.bin b/bgfx/shaders/gles/chains/xbr/fs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..b4875edd7c6 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/fs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/gles/chains/xbr/fs_xbr-lv3-noblend.bin b/bgfx/shaders/gles/chains/xbr/fs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..8ef2d000e2b --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/fs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/gles/chains/xbr/fs_xbr-lv3.bin b/bgfx/shaders/gles/chains/xbr/fs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..e2d807898a8 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/fs_xbr-lv3.bin diff --git a/bgfx/shaders/gles/chains/xbr/vs_xbr-lv2-noblend.bin b/bgfx/shaders/gles/chains/xbr/vs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/vs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/gles/chains/xbr/vs_xbr-lv3-noblend.bin b/bgfx/shaders/gles/chains/xbr/vs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/vs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/gles/chains/xbr/vs_xbr-lv3.bin b/bgfx/shaders/gles/chains/xbr/vs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/vs_xbr-lv3.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..07cc94a825f --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..d76f9820389 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..3bc5c076820 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..d43108803f4 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..b56fb7f7b45 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..7c32cfef709 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..ca0c4c91c71 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..4363644e3a5 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..dba31ac29cb --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..df193d6dc41 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..736852f06b3 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..781d845f6bb --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..2788c66aaee --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..1695f2c7e1a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..7f285bb36d9 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..4421f9fd736 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..e19250609ee --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..e19250609ee --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..e19250609ee --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..4582d6f5e1b --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..24e46c52d0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..0b3b52cd27d --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin Binary files differnew file mode 100644 index 00000000000..8a4c94597f2 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..091d42e9d3e --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin Binary files differnew file mode 100644 index 00000000000..97b44e39b56 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin Binary files differnew file mode 100644 index 00000000000..8b8020487b8 --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/gles/chains/xbr-hybrid/vs_blit.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin Binary files differindex 9dd618de8a0..1f70fb1d7da 100644 --- a/bgfx/shaders/gles/chains/xbr-hybrid/vs_blit.bin +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..dd851ddde0a --- /dev/null +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/gles/chains/super-4xbr-3d-6p-smoother/vs_blit.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin Binary files differindex 9dd618de8a0..9f5f41320c0 100644 --- a/bgfx/shaders/gles/chains/super-4xbr-3d-6p-smoother/vs_blit.bin +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/gles/chains/xbr-lv1-noblend/vs_blit.bin b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin Binary files differindex 9dd618de8a0..9f5f41320c0 100644 --- a/bgfx/shaders/gles/chains/xbr-lv1-noblend/vs_blit.bin +++ b/bgfx/shaders/gles/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/glsl/chains/blurs/fs_smart-blur.bin b/bgfx/shaders/glsl/chains/blurs/fs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..442d5cdadf1 --- /dev/null +++ b/bgfx/shaders/glsl/chains/blurs/fs_smart-blur.bin diff --git a/bgfx/shaders/glsl/chains/blurs/vs_smart-blur.bin b/bgfx/shaders/glsl/chains/blurs/vs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..c034943e250 --- /dev/null +++ b/bgfx/shaders/glsl/chains/blurs/vs_smart-blur.bin diff --git a/bgfx/shaders/glsl/chains/supereagle/fs_eagle.bin b/bgfx/shaders/glsl/chains/eagle/fs_eagle.bin Binary files differindex 1c640de9db8..1c640de9db8 100644 --- a/bgfx/shaders/glsl/chains/supereagle/fs_eagle.bin +++ b/bgfx/shaders/glsl/chains/eagle/fs_eagle.bin diff --git a/bgfx/shaders/glsl/chains/supereagle/vs_eagle.bin b/bgfx/shaders/glsl/chains/eagle/vs_eagle.bin Binary files differindex d5eccb4c173..d5eccb4c173 100644 --- a/bgfx/shaders/glsl/chains/supereagle/vs_eagle.bin +++ b/bgfx/shaders/glsl/chains/eagle/vs_eagle.bin diff --git a/bgfx/shaders/glsl/chains/hq2x/fs_hq2x.bin b/bgfx/shaders/glsl/chains/hqx/fs_hq2x.bin Binary files differindex 7f3b9f36263..7f3b9f36263 100644 --- a/bgfx/shaders/glsl/chains/hq2x/fs_hq2x.bin +++ b/bgfx/shaders/glsl/chains/hqx/fs_hq2x.bin diff --git a/bgfx/shaders/glsl/chains/hq3x/fs_hq3x.bin b/bgfx/shaders/glsl/chains/hqx/fs_hq3x.bin Binary files differindex b74aea5e0af..b74aea5e0af 100644 --- a/bgfx/shaders/glsl/chains/hq3x/fs_hq3x.bin +++ b/bgfx/shaders/glsl/chains/hqx/fs_hq3x.bin diff --git a/bgfx/shaders/glsl/chains/hq4x/fs_hq4x.bin b/bgfx/shaders/glsl/chains/hqx/fs_hq4x.bin Binary files differindex 86a90e7fa48..86a90e7fa48 100644 --- a/bgfx/shaders/glsl/chains/hq4x/fs_hq4x.bin +++ b/bgfx/shaders/glsl/chains/hqx/fs_hq4x.bin diff --git a/bgfx/shaders/glsl/chains/hq2x/vs_hq2x.bin b/bgfx/shaders/glsl/chains/hqx/vs_hq2x.bin Binary files differindex 789e990106d..789e990106d 100644 --- a/bgfx/shaders/glsl/chains/hq2x/vs_hq2x.bin +++ b/bgfx/shaders/glsl/chains/hqx/vs_hq2x.bin diff --git a/bgfx/shaders/glsl/chains/hq3x/vs_hq3x.bin b/bgfx/shaders/glsl/chains/hqx/vs_hq3x.bin Binary files differindex 789e990106d..789e990106d 100644 --- a/bgfx/shaders/glsl/chains/hq3x/vs_hq3x.bin +++ b/bgfx/shaders/glsl/chains/hqx/vs_hq3x.bin diff --git a/bgfx/shaders/glsl/chains/hq4x/vs_hq4x.bin b/bgfx/shaders/glsl/chains/hqx/vs_hq4x.bin Binary files differindex 789e990106d..789e990106d 100644 --- a/bgfx/shaders/glsl/chains/hq4x/vs_hq4x.bin +++ b/bgfx/shaders/glsl/chains/hqx/vs_hq4x.bin diff --git a/bgfx/shaders/glsl/chains/super-4xbr-3d-4p/fs_blit.bin b/bgfx/shaders/glsl/chains/super-4xbr-3d-4p/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/super-4xbr-3d-4p/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/super-4xbr-3d-6p-smoother/fs_blit.bin b/bgfx/shaders/glsl/chains/super-4xbr-3d-6p-smoother/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/super-4xbr-3d-6p-smoother/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/supereagle/fs_blit.bin b/bgfx/shaders/glsl/chains/supereagle/fs_blit.bin Binary files differdeleted file mode 100644 index 3104b9e54b2..00000000000 --- a/bgfx/shaders/glsl/chains/supereagle/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/supereagle/vs_blit.bin b/bgfx/shaders/glsl/chains/supereagle/vs_blit.bin Binary files differdeleted file mode 100644 index 88ad318046c..00000000000 --- a/bgfx/shaders/glsl/chains/supereagle/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/warp/fs_dilation-horizontal-fast.bin b/bgfx/shaders/glsl/chains/warp/fs_dilation-horizontal-fast.bin Binary files differnew file mode 100644 index 00000000000..f5c958c3a24 --- /dev/null +++ b/bgfx/shaders/glsl/chains/warp/fs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/glsl/chains/super-4xbr-3d-6p-smoother/vs_blit.bin b/bgfx/shaders/glsl/chains/warp/vs_dilation-horizontal-fast.bin Binary files differindex af6c9349f41..aa75b840f57 100644 --- a/bgfx/shaders/glsl/chains/super-4xbr-3d-6p-smoother/vs_blit.bin +++ b/bgfx/shaders/glsl/chains/warp/vs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/glsl/chains/xbr-hybrid/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-hybrid/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-hybrid/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv1-noblend/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv1-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv1-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-3d/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-3d/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-3d/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-3d/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-3d/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-3d/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-multipass/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-multipass/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-deposterize/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-deposterize/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-deposterize/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-deposterize/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-deposterize/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-deposterize/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-fast/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-fast/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-fast/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-fast/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-fast/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-fast/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-multipass/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-multipass/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-noblend/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv2-noblend/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv2-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv2-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv3-multipass/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv3-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv3-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv3-multipass/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv3-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv3-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv3-noblend/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv3-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv3-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv3-noblend/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv3-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv3-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv3/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv3/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv3/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-lv3/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-lv3/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-lv3/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-mlv4-dilation/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-mlv4-dilation/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-mlv4-dilation/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-mlv4-dilation/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-mlv4-dilation/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-mlv4-dilation/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-mlv4-multipass/fs_blit.bin b/bgfx/shaders/glsl/chains/xbr-mlv4-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index db0fe2b487b..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-mlv4-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr-mlv4-multipass/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr-mlv4-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index af6c9349f41..00000000000 --- a/bgfx/shaders/glsl/chains/xbr-mlv4-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv2-noblend.bin b/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..f404bb3847c --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv3-noblend.bin b/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..f8cbc73f326 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv3.bin b/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..9eeb127cdf9 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/fs_xbr-lv3.bin diff --git a/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv2-noblend.bin b/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv3-noblend.bin b/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv3.bin b/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/vs_xbr-lv3.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..d84b3236975 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..df01409e7ea --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..79d573d3085 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..924c586a750 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..20eb843b5ae --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..286f94e019c --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..42788a3d40c --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..b9c800b73ef --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..0021e9a700e --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..4e2d3470812 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..9483a864100 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..e07c6914544 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..81460e54d9d --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..57b6d8e8300 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..bfcb3e7b1a5 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..0e1d66c1644 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..b0346c82ec3 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..b0346c82ec3 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..b0346c82ec3 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..ef27a84cdc1 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..dfd83d4fd38 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..daf1ea4b5de --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin Binary files differnew file mode 100644 index 00000000000..e288d693dbc --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..09fe6dd9e27 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin Binary files differnew file mode 100644 index 00000000000..9310fb7efe7 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin Binary files differnew file mode 100644 index 00000000000..836308b88e2 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/glsl/chains/super-4xbr-3d-4p/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin Binary files differindex af6c9349f41..930652f50c0 100644 --- a/bgfx/shaders/glsl/chains/super-4xbr-3d-4p/vs_blit.bin +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..d8d081a91d0 --- /dev/null +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/glsl/chains/xbr-lv1-noblend/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin Binary files differindex af6c9349f41..3d3962b3901 100644 --- a/bgfx/shaders/glsl/chains/xbr-lv1-noblend/vs_blit.bin +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/glsl/chains/xbr-hybrid/vs_blit.bin b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin Binary files differindex af6c9349f41..3d3962b3901 100644 --- a/bgfx/shaders/glsl/chains/xbr-hybrid/vs_blit.bin +++ b/bgfx/shaders/glsl/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/metal/chains/blurs/fs_smart-blur.bin b/bgfx/shaders/metal/chains/blurs/fs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..581ef2f75cc --- /dev/null +++ b/bgfx/shaders/metal/chains/blurs/fs_smart-blur.bin diff --git a/bgfx/shaders/metal/chains/blurs/vs_smart-blur.bin b/bgfx/shaders/metal/chains/blurs/vs_smart-blur.bin Binary files differnew file mode 100644 index 00000000000..4bd75b98140 --- /dev/null +++ b/bgfx/shaders/metal/chains/blurs/vs_smart-blur.bin diff --git a/bgfx/shaders/metal/chains/supereagle/fs_eagle.bin b/bgfx/shaders/metal/chains/eagle/fs_eagle.bin Binary files differindex 2d70baf9545..2d70baf9545 100644 --- a/bgfx/shaders/metal/chains/supereagle/fs_eagle.bin +++ b/bgfx/shaders/metal/chains/eagle/fs_eagle.bin diff --git a/bgfx/shaders/metal/chains/supereagle/vs_eagle.bin b/bgfx/shaders/metal/chains/eagle/vs_eagle.bin Binary files differindex 268549ac9d2..268549ac9d2 100644 --- a/bgfx/shaders/metal/chains/supereagle/vs_eagle.bin +++ b/bgfx/shaders/metal/chains/eagle/vs_eagle.bin diff --git a/bgfx/shaders/metal/chains/hq2x/fs_hq2x.bin b/bgfx/shaders/metal/chains/hqx/fs_hq2x.bin Binary files differindex 434944fc7f3..434944fc7f3 100644 --- a/bgfx/shaders/metal/chains/hq2x/fs_hq2x.bin +++ b/bgfx/shaders/metal/chains/hqx/fs_hq2x.bin diff --git a/bgfx/shaders/metal/chains/hq3x/fs_hq3x.bin b/bgfx/shaders/metal/chains/hqx/fs_hq3x.bin Binary files differindex 38ae9cf1aa5..38ae9cf1aa5 100644 --- a/bgfx/shaders/metal/chains/hq3x/fs_hq3x.bin +++ b/bgfx/shaders/metal/chains/hqx/fs_hq3x.bin diff --git a/bgfx/shaders/metal/chains/hq4x/fs_hq4x.bin b/bgfx/shaders/metal/chains/hqx/fs_hq4x.bin Binary files differindex 5e417d94af9..5e417d94af9 100644 --- a/bgfx/shaders/metal/chains/hq4x/fs_hq4x.bin +++ b/bgfx/shaders/metal/chains/hqx/fs_hq4x.bin diff --git a/bgfx/shaders/metal/chains/hq2x/vs_hq2x.bin b/bgfx/shaders/metal/chains/hqx/vs_hq2x.bin Binary files differindex d7332288c05..d7332288c05 100644 --- a/bgfx/shaders/metal/chains/hq2x/vs_hq2x.bin +++ b/bgfx/shaders/metal/chains/hqx/vs_hq2x.bin diff --git a/bgfx/shaders/metal/chains/hq3x/vs_hq3x.bin b/bgfx/shaders/metal/chains/hqx/vs_hq3x.bin Binary files differindex d7332288c05..d7332288c05 100644 --- a/bgfx/shaders/metal/chains/hq3x/vs_hq3x.bin +++ b/bgfx/shaders/metal/chains/hqx/vs_hq3x.bin diff --git a/bgfx/shaders/metal/chains/hq4x/vs_hq4x.bin b/bgfx/shaders/metal/chains/hqx/vs_hq4x.bin Binary files differindex d7332288c05..d7332288c05 100644 --- a/bgfx/shaders/metal/chains/hq4x/vs_hq4x.bin +++ b/bgfx/shaders/metal/chains/hqx/vs_hq4x.bin diff --git a/bgfx/shaders/metal/chains/super-4xbr-3d-4p/fs_blit.bin b/bgfx/shaders/metal/chains/super-4xbr-3d-4p/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/super-4xbr-3d-4p/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/super-4xbr-3d-6p-smoother/fs_blit.bin b/bgfx/shaders/metal/chains/super-4xbr-3d-6p-smoother/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/super-4xbr-3d-6p-smoother/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/supereagle/fs_blit.bin b/bgfx/shaders/metal/chains/supereagle/fs_blit.bin Binary files differdeleted file mode 100644 index a0cb475e932..00000000000 --- a/bgfx/shaders/metal/chains/supereagle/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/supereagle/vs_blit.bin b/bgfx/shaders/metal/chains/supereagle/vs_blit.bin Binary files differdeleted file mode 100644 index eee8677be39..00000000000 --- a/bgfx/shaders/metal/chains/supereagle/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/warp/fs_dilation-horizontal-fast.bin b/bgfx/shaders/metal/chains/warp/fs_dilation-horizontal-fast.bin Binary files differnew file mode 100644 index 00000000000..cc7a76e66aa --- /dev/null +++ b/bgfx/shaders/metal/chains/warp/fs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/metal/chains/xbr-lv1-noblend/vs_blit.bin b/bgfx/shaders/metal/chains/warp/vs_dilation-horizontal-fast.bin Binary files differindex 122b7dee5c3..decac68eaf2 100644 --- a/bgfx/shaders/metal/chains/xbr-lv1-noblend/vs_blit.bin +++ b/bgfx/shaders/metal/chains/warp/vs_dilation-horizontal-fast.bin diff --git a/bgfx/shaders/metal/chains/xbr-hybrid/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-hybrid/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-hybrid/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv1-noblend/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv1-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv1-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-3d/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-3d/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-3d/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-3d/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-3d/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-3d/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-multipass/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-accuracy-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-multipass/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-accuracy-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-smart-blur/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-accuracy-smart-blur/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-deposterize/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-deposterize/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-deposterize/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-deposterize/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-deposterize/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-deposterize/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-fast/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-fast/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-fast/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-fast/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-fast/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-fast/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-multipass/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-multipass/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-noblend/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv2-noblend/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv2-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv2-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv3-multipass/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv3-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv3-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv3-multipass/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv3-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv3-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv3-noblend/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv3-noblend/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv3-noblend/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv3-noblend/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv3-noblend/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv3-noblend/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv3/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv3/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv3/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-lv3/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-lv3/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-lv3/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-mlv4-dilation/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-mlv4-dilation/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-mlv4-dilation/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-mlv4-dilation/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-mlv4-dilation/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-mlv4-dilation/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-mlv4-multipass/fs_blit.bin b/bgfx/shaders/metal/chains/xbr-mlv4-multipass/fs_blit.bin Binary files differdeleted file mode 100644 index 6a3da392480..00000000000 --- a/bgfx/shaders/metal/chains/xbr-mlv4-multipass/fs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr-mlv4-multipass/vs_blit.bin b/bgfx/shaders/metal/chains/xbr-mlv4-multipass/vs_blit.bin Binary files differdeleted file mode 100644 index 122b7dee5c3..00000000000 --- a/bgfx/shaders/metal/chains/xbr-mlv4-multipass/vs_blit.bin +++ /dev/null diff --git a/bgfx/shaders/metal/chains/xbr/fs_xbr-lv2-noblend.bin b/bgfx/shaders/metal/chains/xbr/fs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..091187d7a45 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/fs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/metal/chains/xbr/fs_xbr-lv3-noblend.bin b/bgfx/shaders/metal/chains/xbr/fs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..1f336dae013 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/fs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/metal/chains/xbr/fs_xbr-lv3.bin b/bgfx/shaders/metal/chains/xbr/fs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..64cfb6ed994 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/fs_xbr-lv3.bin diff --git a/bgfx/shaders/metal/chains/xbr/vs_xbr-lv2-noblend.bin b/bgfx/shaders/metal/chains/xbr/vs_xbr-lv2-noblend.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/vs_xbr-lv2-noblend.bin diff --git a/bgfx/shaders/metal/chains/xbr/vs_xbr-lv3-noblend.bin b/bgfx/shaders/metal/chains/xbr/vs_xbr-lv3-noblend.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/vs_xbr-lv3-noblend.bin diff --git a/bgfx/shaders/metal/chains/xbr/vs_xbr-lv3.bin b/bgfx/shaders/metal/chains/xbr/vs_xbr-lv3.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/vs_xbr-lv3.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..da4e73e073f --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..ce8fb5c9af7 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..46f7705b510 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..f3181814f10 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..1816d716785 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..cb44c5354fa --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..4ac54dc804f --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..7416db18edc --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..f6122c970c4 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..1c9652688c6 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..665fec3186e --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..896071a63cd --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..49ade63740b --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..453fce0f89b --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..684131e13c7 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..e2deee8aee3 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin Binary files differnew file mode 100644 index 00000000000..fc154cbf793 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin Binary files differnew file mode 100644 index 00000000000..fc154cbf793 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin Binary files differnew file mode 100644 index 00000000000..fc154cbf793 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..f291cdbff41 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..b8a55e3f1b2 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin Binary files differnew file mode 100644 index 00000000000..97972ff4759 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin Binary files differnew file mode 100644 index 00000000000..6a12b320a2d --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..4fc88cb5537 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin Binary files differnew file mode 100644 index 00000000000..4ac8e8ff6ee --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin Binary files differnew file mode 100644 index 00000000000..edfa341b54c --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.bin diff --git a/bgfx/shaders/metal/chains/super-4xbr-3d-6p-smoother/vs_blit.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin Binary files differindex 122b7dee5c3..79448501cb2 100644 --- a/bgfx/shaders/metal/chains/super-4xbr-3d-6p-smoother/vs_blit.bin +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.bin diff --git a/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin Binary files differnew file mode 100644 index 00000000000..f39ca902371 --- /dev/null +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.bin diff --git a/bgfx/shaders/metal/chains/xbr-hybrid/vs_blit.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin Binary files differindex 122b7dee5c3..5d97f29fdba 100644 --- a/bgfx/shaders/metal/chains/xbr-hybrid/vs_blit.bin +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.bin diff --git a/bgfx/shaders/metal/chains/super-4xbr-3d-4p/vs_blit.bin b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin Binary files differindex 122b7dee5c3..5d97f29fdba 100644 --- a/bgfx/shaders/metal/chains/super-4xbr-3d-4p/vs_blit.bin +++ b/bgfx/shaders/metal/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.bin diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp index c3aeb586136..70d678d1f2b 100644 --- a/src/osd/modules/render/bgfx/chainmanager.cpp +++ b/src/osd/modules/render/bgfx/chainmanager.cpp @@ -59,9 +59,9 @@ chain_manager::~chain_manager() void chain_manager::refresh_available_chains() { m_available_chains.clear(); - m_available_chains.push_back("none"); + m_available_chains.push_back(chain_desc("none", "")); - find_available_chains(std::string(m_options.bgfx_path()) + "/chains"); + find_available_chains(std::string(m_options.bgfx_path()) + "/chains", ""); destroy_unloaded_chains(); } @@ -74,9 +74,9 @@ void chain_manager::destroy_unloaded_chains() std::string name = m_chain_names[i]; if (name.length() > 0) { - for (std::string available_name : m_available_chains) + for (chain_desc desc : m_available_chains) { - if (available_name == name) + if (desc.m_name == name) { delete m_screen_chains[i]; m_chain_names[i] = ""; @@ -88,9 +88,9 @@ void chain_manager::destroy_unloaded_chains() } } -void chain_manager::find_available_chains(std::string path) +void chain_manager::find_available_chains(std::string root, std::string path) { - osd_directory *directory = osd_opendir(path.c_str()); + osd_directory *directory = osd_opendir((root + path).c_str()); if (directory != nullptr) { for (const osd_directory_entry *entry = osd_readdir(directory); entry != nullptr; entry = osd_readdir(directory)) @@ -109,7 +109,7 @@ void chain_manager::find_available_chains(std::string path) // Does it end in .json? if (test_segment == extension) { - m_available_chains.push_back(name.substr(0, start)); + m_available_chains.push_back(chain_desc(name.substr(0, start), path)); } } } @@ -118,7 +118,12 @@ void chain_manager::find_available_chains(std::string path) std::string name = entry->name; if (!(name == "." || name == "..")) { - find_available_chains(path + PATH_SEPARATOR + name); + std::string appended_path = path + "/" + name; + if (path.length() == 0) + { + appended_path = name; + } + find_available_chains(root, path + "/" + name); } } } @@ -189,7 +194,7 @@ void chain_manager::parse_chain_selections(std::string chain_str) size_t chain_index = 0; for (chain_index = 0; chain_index < m_available_chains.size(); chain_index++) { - if (m_available_chains[chain_index] == chain_names[index]) + if (m_available_chains[chain_index].m_name == chain_names[index]) { break; } @@ -198,7 +203,7 @@ void chain_manager::parse_chain_selections(std::string chain_str) if (chain_index < m_available_chains.size()) { m_current_chain[index] = chain_index; - m_chain_names[index] = m_available_chains[chain_index]; + m_chain_names[index] = m_available_chains[chain_index].m_name; } else { @@ -240,8 +245,9 @@ void chain_manager::load_chains() { if (m_current_chain[chain] != CHAIN_NONE) { - m_chain_names[chain] = m_available_chains[m_current_chain[chain]]; - m_screen_chains[chain] = load_chain(m_chain_names[chain], uint32_t(chain)); + chain_desc& desc = m_available_chains[m_current_chain[chain]]; + m_chain_names[chain] = desc.m_name; + m_screen_chains[chain] = load_chain(desc.m_path + "/" + desc.m_name, uint32_t(chain)); } } } @@ -369,7 +375,7 @@ int32_t chain_manager::chain_changed(int32_t id, std::string *str, int32_t newva if (str != nullptr) { - *str = string_format("%s", m_available_chains[m_current_chain[id]].c_str()); + *str = string_format("%s", m_available_chains[m_current_chain[id]].m_name.c_str()); } return m_current_chain[id]; diff --git a/src/osd/modules/render/bgfx/chainmanager.h b/src/osd/modules/render/bgfx/chainmanager.h index d527bc7122c..022fe6e3b2e 100644 --- a/src/osd/modules/render/bgfx/chainmanager.h +++ b/src/osd/modules/render/bgfx/chainmanager.h @@ -30,6 +30,19 @@ class render_primitive; class bgfx_chain; class bgfx_slider; +class chain_desc +{ +public: + chain_desc(std::string name, std::string path) + : m_name(name) + , m_path(path) + { + } + + const std::string m_name; + const std::string m_path; +}; + class chain_manager { public: @@ -60,7 +73,7 @@ private: void refresh_available_chains(); void destroy_unloaded_chains(); - void find_available_chains(std::string path); + void find_available_chains(std::string root, std::string path); void parse_chain_selections(std::string chain_str); std::vector<std::string> split_option_string(std::string chain_str) const; @@ -79,7 +92,7 @@ private: uint32_t m_window_index; slider_dirty_notifier& m_slider_notifier; uint32_t m_screen_count; - std::vector<std::string> m_available_chains; + std::vector<chain_desc> m_available_chains; std::vector<bgfx_chain*> m_screen_chains; std::vector<std::string> m_chain_names; std::vector<ui_menu_item> m_selection_sliders; diff --git a/src/osd/modules/render/bgfx/shaders/chains/blurs/fs_smart-blur.sc b/src/osd/modules/render/bgfx/shaders/chains/blurs/fs_smart-blur.sc new file mode 100644 index 00000000000..78229ec9c49 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/blurs/fs_smart-blur.sc @@ -0,0 +1,64 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian Smart-Blur Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +SAMPLER2D(s_p, 0); + +uniform vec4 SB_THRESHOLD; + +// Below the thresholds, blur is applied for each color channel. +// Threshold is the max color differency among the eight pixel neighbors from central pixel. + +bool eq(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r < SB_THRESHOLD.r && df.g < SB_THRESHOLD.g && df.b < SB_THRESHOLD.b; +} + +void main() +{ + vec3 A = texture2D(s_p, v_texcoord1.xw).xyz; + vec3 B = texture2D(s_p, v_texcoord1.yw).xyz; + vec3 C = texture2D(s_p, v_texcoord1.zw).xyz; + vec3 D = texture2D(s_p, v_texcoord2.xw).xyz; + vec3 E = texture2D(s_p, v_texcoord2.yw).xyz; + vec3 F = texture2D(s_p, v_texcoord2.zw).xyz; + vec3 G = texture2D(s_p, v_texcoord3.xw).xyz; + vec3 H = texture2D(s_p, v_texcoord3.yw).xyz; + vec3 I = texture2D(s_p, v_texcoord3.zw).xyz; + + if (eq(E,F) && eq(E,H) && eq(E,I) && eq(E,B) && eq(E,C) && eq(E,A) && eq(E,D) && eq(E,G)) + { + E = (A + B + C + D + E + F + G + H + I) / 9.0; + } + + gl_FragColor = vec4(E, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq2x/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/blurs/varying.def.sc index 57a7a910952..57a7a910952 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq2x/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/blurs/varying.def.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/blurs/vs_smart-blur.sc b/src/osd/modules/render/bgfx/shaders/chains/blurs/vs_smart-blur.sc new file mode 100644 index 00000000000..c82d7c82bec --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/blurs/vs_smart-blur.sc @@ -0,0 +1,48 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian Smart-Blur Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, -dy); // A B C + v_texcoord2 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, 0.0); // D E F + v_texcoord3 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, dy); // G H I + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_eagle.sc b/src/osd/modules/render/bgfx/shaders/chains/eagle/fs_eagle.sc index a07a848ffbd..a07a848ffbd 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_eagle.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/eagle/fs_eagle.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/eagle/varying.def.sc index 7adabc462e5..7adabc462e5 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/eagle/varying.def.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_eagle.sc b/src/osd/modules/render/bgfx/shaders/chains/eagle/vs_eagle.sc index d233629a036..d233629a036 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_eagle.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/eagle/vs_eagle.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq2x/fs_hq2x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq2x.sc index 66bd69f253e..66bd69f253e 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq2x/fs_hq2x.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq2x.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq3x/fs_hq3x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq3x.sc index 8e0f46a80f1..8e0f46a80f1 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq3x/fs_hq3x.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq3x.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq4x/fs_hq4x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq4x.sc index 8e769bee46c..8e769bee46c 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq4x/fs_hq4x.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/fs_hq4x.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq3x/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/varying.def.sc index 57a7a910952..57a7a910952 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq3x/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/varying.def.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq2x/vs_hq2x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq2x.sc index a77ac7006f7..a77ac7006f7 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq2x/vs_hq2x.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq2x.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq3x/vs_hq3x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq3x.sc index a77ac7006f7..a77ac7006f7 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq3x/vs_hq3x.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq3x.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq4x/vs_hq4x.sc b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq4x.sc index a77ac7006f7..a77ac7006f7 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq4x/vs_hq4x.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/hqx/vs_hq4x.sc diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_blit.sc deleted file mode 100644 index 874846cce0d..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, texCoord - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, texCoord) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_blit.sc deleted file mode 100644 index 7d857008291..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/supereagle/vs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input a_position, a_texcoord0, a_color0 -$output texCoord, v_color0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - texCoord = a_texcoord0.xy; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/warp/fs_dilation-horizontal-fast.sc b/src/osd/modules/render/bgfx/shaders/chains/warp/fs_dilation-horizontal-fast.sc new file mode 100644 index 00000000000..3f03d8e6adb --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/warp/fs_dilation-horizontal-fast.sc @@ -0,0 +1,46 @@ +$input v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's dilation-horizontal-fast Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +#define TEX(dx,dy) texture2D(decal, v_texcoord0 + vec2(dx,dy) * v_texcoord1.xy) + +void main() +{ + vec3 D = TEX(-1, 0).rgb; + vec3 E = TEX( 0, 0).rgb; + vec3 F = TEX( 1, 0).rgb; + + vec3 res = max(E, max(F, D)); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/hq4x/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/warp/varying.def.sc index 57a7a910952..8404fc635e1 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/hq4x/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/warp/varying.def.sc @@ -1,8 +1,6 @@ vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); vec3 a_position : POSITION; vec4 a_color0 : COLOR0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/warp/vs_dilation-horizontal-fast.sc b/src/osd/modules/render/bgfx/shaders/chains/warp/vs_dilation-horizontal-fast.sc new file mode 100644 index 00000000000..828dc3078cf --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/warp/vs_dilation-horizontal-fast.sc @@ -0,0 +1,51 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's dilation-horizontal-fast Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + // B + // D E F + // H + + v_texcoord1 = vec4(1.0 / u_tex_size0.xy, 0.0, 0.0); // F H + + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-3d/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-multipass/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-accuracy-smart-blur/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-deposterize/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-fast/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-multipass/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv2-noblend/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-multipass/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3-noblend/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv3/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-dilation/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/fs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/fs_blit.sc deleted file mode 100644 index 9af7bcf0ee6..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/fs_blit.sc +++ /dev/null @@ -1,14 +0,0 @@ -$input v_color0, v_texcoord0 - -// license:BSD-3-Clause -// copyright-holders:Dario Manesku - -#include "common.sh" - -// Samplers -SAMPLER2D(s_tex, 0); - -void main() -{ - gl_FragColor = texture2D(s_tex, v_texcoord0) * v_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/varying.def.sc deleted file mode 100644 index c65b5426733..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/varying.def.sc +++ /dev/null @@ -1,10 +0,0 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); -vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); -vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); - -vec3 a_position : POSITION; -vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/vs_blit.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/vs_blit.sc deleted file mode 100644 index 405ef8feb3b..00000000000 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-mlv4-multipass/vs_blit.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 "common.sh" - -void main() -{ - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); - v_texcoord0 = a_texcoord0; - v_color0 = a_color0; -} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv2-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv2-noblend.sc new file mode 100644 index 00000000000..ee5ebb4398e --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv2-noblend.sc @@ -0,0 +1,210 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-noblend Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 XBR_EQ_THRESHOLD; +uniform vec4 XBR_LV2_COEFFICIENT; + +uniform vec4 u_tex_size0; + +SAMPLER2D(decal, 0); + +// Uncomment just one of the three params below to choose the corner detection +#define CORNER_A +//#define CORNER_B +//#define CORNER_C +//#define CORNER_D + +const vec4 Y = vec4(0.2126, 0.7152, 0.0722, 0.0); + +vec4 df(vec4 A, vec4 B) +{ + return abs(A - B); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 eq(vec4 A, vec4 B) +{ + return vec4(equal(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 gt(vec4 A, vec4 B) +{ + return vec4(greaterThan(A, B)); +} + +vec4 abslt(vec4 A, vec4 B) +{ + return lt(df(A, B), XBR_EQ_THRESHOLD.xxxx); +} + +vec4 absge(vec4 A, vec4 B) +{ + return ge(df(A, B), XBR_EQ_THRESHOLD.xxxx); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), Y); + vec4 c = mul(mat4(C, A, G, I), Y); + vec4 e = mul(mat4(E, E, E, E), Y); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), Y); + vec4 i5 = mul(mat4(I5, C4, A1, G0), Y); + vec4 h5 = mul(mat4(H5, F4, B1, D0), Y); + vec4 f4 = h5.yzwx; + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = gt(Ao * fp.y + Bo * fp.x, Co); + vec4 fx_left = gt(Ax * fp.y + Bx * fp.x, Cx); + vec4 fx_up = gt(Ay * fp.y + By * fp.x, Cy); + +#ifdef CORNER_A + vec4 interp_restriction_lv1 = ne(e,f) * ne(e,h); +#endif +#ifdef CORNER_B + vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c))); +#endif +#ifdef CORNER_D + vec4 c1 = i4.yzwx; + vec4 g0 = i5.wxyz; + vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c) ) * (ne(f,f4) * ne(f,i) + ne(h,h5) * ne(h,i) + ne(h,g) + ne(f,c) + lt(b,c1) * lt(d,g0))); +#endif +#ifdef CORNER_C + vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c))); +#endif + + interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0); + + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f); + vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i); + + vec4 one = vec4(1.0, 1.0, 1.0, 1.0); + vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); + vec4 edri = le(wd1,wd2) * interp_restriction_lv1; + vec4 edr = lt(wd1,wd2) * interp_restriction_lv1 * ((one - edri.yzwx) + (one - edri.wxyz)); + vec4 edr_left = le(XBR_LV2_COEFFICIENT.xxxx * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr * ((one - edri.yzwx) * lt(e,c)); + vec4 edr_up = ge(df(f,g), XBR_LV2_COEFFICIENT.xxxx * df(h,c)) * interp_restriction_lv2_up * edr * ((one - edri.wxyz) * lt(e,g)); + + + vec4 nc = clamp(edr * (fx + edr_left * fx_left + edr_up * fx_up), 0.0, 1.0); + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res1 = nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : E.xyz; + vec3 res2 = nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : E.xyz; + + vec2 df12 = abs(mul(mat3(res1, res2, vec3(0.0, 0.0, 0.0)), Y.xyz).xy - e.xy); + + vec3 res_mix = (df12.y >= df12.x) ? vec3(1.0, 1.0, 1.0) : vec3(0.0, 0.0, 0.0); + vec3 res = mix(res1, res2, res_mix); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3-noblend.sc new file mode 100644 index 00000000000..05cf1124896 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3-noblend.sc @@ -0,0 +1,234 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3-noblend - Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 XBR_EQ_THRESHOLD; +uniform vec4 XBR_EQ_THRESHOLD2; +uniform vec4 XBR_LV2_COEFFICIENT; + +uniform vec4 u_tex_size0; + +SAMPLER2D(decal, 0); + +// Uncomment just one of the three params below to choose the corner detection +#define CORNER_A +//#define CORNER_B +//#define CORNER_C +//#define CORNER_D + +const vec4 Y = vec4(0.2126, 0.7152, 0.0722, 0.0); + +vec4 df(vec4 A, vec4 B) +{ + return abs(A - B); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 eq(vec4 A, vec4 B) +{ + return vec4(equal(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 gt(vec4 A, vec4 B) +{ + return vec4(greaterThan(A, B)); +} + +vec4 abslt2(vec4 A, vec4 B) +{ + return lt(df(A, B), XBR_EQ_THRESHOLD2.xxxx); +} + +vec4 absge(vec4 A, vec4 B) +{ + return ge(df(A, B), XBR_EQ_THRESHOLD.xxxx); +} + +vec4 absge2(vec4 A, vec4 B) +{ + return ge(df(A, B), XBR_EQ_THRESHOLD2.xxxx); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), Y); + vec4 c = mul(mat4(C, A, G, I), Y); + vec4 e = mul(mat4(E, E, E, E), Y); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), Y); + vec4 i5 = mul(mat4(I5, C4, A1, G0), Y); + vec4 h5 = mul(mat4(H5, F4, B1, D0), Y); + vec4 f4 = h5.yzwx; + + vec4 c4 = i5.yzwx; + vec4 g5 = i4.wxyz; + + vec4 c1 = i4.yzwx; + vec4 g0 = i5.wxyz; + vec4 b1 = h5.zwxy; + vec4 d0 = h5.wxyz; + + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + vec4 Az = vec4( 6.0, -2.0, -6.0, 2.0 ); + vec4 Bz = vec4( 2.0, 6.0, -2.0, -6.0 ); + vec4 Cz = vec4( 5.0, 3.0, -3.0, -1.0 ); + vec4 Aw = vec4( 2.0, -6.0, -2.0, 6.0 ); + vec4 Bw = vec4( 6.0, 2.0, -6.0,-2.0 ); + vec4 Cw = vec4( 5.0, -1.0, -3.0, 3.0 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = gt(Ao * fp.y + Bo * fp.x, Co); + vec4 fx_left = gt(Ax * fp.y + Bx * fp.x, Cx); + vec4 fx_up = gt(Ay * fp.y + By * fp.x, Cy); + vec4 fx3_left= gt(Az * fp.y + Bz * fp.x, Cz); + vec4 fx3_up = gt(Aw * fp.y + Bw * fp.x, Cw); + + vec4 interp_restriction_lv0 = (ne(e,f) * ne(e,h)); + + // It uses CORNER_C if none of the others are defined. +#ifdef CORNER_A + vec4 interp_restriction_lv1 = interp_restriction_lv0; +#elif CORNER_B + vec4 interp_restriction_lv1 = (interp_restriction_lv0 * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c))); +#elif CORNER_D + vec4 interp_restriction_lv1 = (interp_restriction_lv0 * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c)) * (ne(f,f4) * ne(f,i) + ne(h,h5) * ne(h,i) + ne(h,g) + ne(f,c) + lt(b,c1) * lt(d,g0))); +#elif CORNER_C + vec4 interp_restriction_lv1 = (interp_restriction_lv0 * (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c))); +#endif + + interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0); + + vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g); + vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c); + vec4 interp_restriction_lv3_left = abslt2(g,g0) * absge2(d0,g0); + vec4 interp_restriction_lv3_up = abslt2(c,c1) * absge2(b1,c1); + + vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f); + vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i); + + vec4 one = vec4(1.0, 1.0, 1.0, 1.0); + vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); + vec4 edri = le(wd1,wd2) * interp_restriction_lv1; + vec4 edr = clamp(lt(wd1,wd2) * interp_restriction_lv1 * ((one - edri.yzwx) + (one - edri.wxyz)), 0.0, 1.0); + vec4 edr_left = le(XBR_LV2_COEFFICIENT.xxxx * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr * (one - edri.yzwx) * lt(e,c); + vec4 edr_up = ge(df(f,g), XBR_LV2_COEFFICIENT.xxxx * df(h,c)) * interp_restriction_lv2_up * edr * (one - edri.wxyz) * lt(e,g); + vec4 edr3_left = interp_restriction_lv3_left; + vec4 edr3_up = interp_restriction_lv3_up; + + vec4 nc = clamp((edr * fx + edr_left * (fx_left + edr3_left * fx3_left * lt(e,c4)) + edr_up * (fx_up + edr3_up * fx3_up * lt(e,g5))), 0.0, 1.0); + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res1 = nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : E.xyz; + vec3 res2 = nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : E.xyz; + + vec2 df12 = abs(mul(mat3(res1, res2, zero.xyz), Y.xyz).xy - e.xy); + + vec3 res = mix(res1, res2, (df12.y >= df12.x) ? one.xyz : zero.xyz); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3.sc new file mode 100644 index 00000000000..b2fd0d94714 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/fs_xbr-lv3.sc @@ -0,0 +1,254 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 XBR_Y_WEIGHT; +uniform vec4 XBR_EQ_THRESHOLD; +uniform vec4 XBR_EQ_THRESHOLD2; +uniform vec4 XBR_LV2_COEFFICIENT; + +uniform vec4 u_tex_size0; + +SAMPLER2D(decal, 0); + +const vec4 yuv = vec4(0.299, 0.587, 0.114, 0.0); +const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4); + +vec4 df(vec4 A, vec4 B) +{ + return abs(A - B); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 eq(vec4 A, vec4 B) +{ + return vec4(equal(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 abslt(vec4 A, vec4 B) +{ + return lt(df(A, B), XBR_EQ_THRESHOLD.xxxx); +} + +vec4 abslt2(vec4 A, vec4 B) +{ + return lt(df(A, B), XBR_EQ_THRESHOLD2.xxxx); +} + +vec4 absge(vec4 A, vec4 B) +{ + return ge(df(A, B), XBR_EQ_THRESHOLD.xxxx); +} + +vec4 absge2(vec4 A, vec4 B) +{ + return ge(df(A, B), XBR_EQ_THRESHOLD2.xxxx); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), XBR_Y_WEIGHT.xxxx * yuv); + vec4 c = mul(mat4(C, A, G, I), XBR_Y_WEIGHT.xxxx * yuv); + vec4 e = mul(mat4(E, E, E, E), XBR_Y_WEIGHT.xxxx * yuv); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), XBR_Y_WEIGHT.xxxx * yuv); + vec4 i5 = mul(mat4(I5, C4, A1, G0), XBR_Y_WEIGHT.xxxx * yuv); + vec4 h5 = mul(mat4(H5, F4, B1, D0), XBR_Y_WEIGHT.xxxx * yuv); + vec4 f4 = h5.yzwx; + + vec4 c1 = i4.yzwx; + vec4 g0 = i5.wxyz; + vec4 b1 = h5.zwxy; + vec4 d0 = h5.wxyz; + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + vec4 Az = vec4( 6.0, -2.0, -6.0, 2.0 ); + vec4 Bz = vec4( 2.0, 6.0, -2.0, -6.0 ); + vec4 Cz = vec4( 5.0, 3.0, -3.0, -1.0 ); + vec4 Aw = vec4( 2.0, -6.0, -2.0, 6.0 ); + vec4 Bw = vec4( 6.0, 2.0, -6.0,-2.0 ); + vec4 Cw = vec4( 5.0, -1.0, -3.0, 3.0 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao * fp.y + Bo * fp.x); + vec4 fx_left = (Ax * fp.y + Bx * fp.x); + vec4 fx_up = (Ay * fp.y + By * fp.x); + vec4 fx3_left= (Az * fp.y + Bz * fp.x); + vec4 fx3_up = (Aw * fp.y + Bw * fp.x); + + vec4 interp_restriction_lv0 = (ne(e,f) * ne(e,h)); + +// It uses CORNER_C if none of the others are defined. +#ifdef CORNER_A + vec4 interp_restriction_lv1 = interp_restriction_lv0; +#elif CORNER_B + vec4 interp_restriction_lv1 = (interp_restriction_lv0 * ( ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c) ) ); +#elif CORNER_D + vec4 interp_restriction_lv1 = (interp_restriction_lv0 * ( ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c) ) * (f!=f4 * f!=i + h!=h5 * h!=i + h!=g + f!=c + lt(b,c1) * lt(d,g0))); +#else + vec4 interp_restriction_lv1 = (interp_restriction_lv0 * ( ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c)) ); +#endif + + interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0); + + vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g); + vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c); + vec4 interp_restriction_lv3_left = abslt2(g,g0) * absge2(d0,g0); + vec4 interp_restriction_lv3_up = abslt2(c,c1) * absge2(b1,c1); + + vec4 fx45 = smoothstep(Co - delta, Co + delta, fx); + vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left); + vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up); + vec4 fx15 = smoothstep(Cz - delta, Cz + delta, fx3_left); + vec4 fx75 = smoothstep(Cw - delta, Cw + delta, fx3_up); + + vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(XBR_LV2_COEFFICIENT.xxxx * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), XBR_LV2_COEFFICIENT.xxxx * df(h,c)) * interp_restriction_lv2_up; + + vec4 edr3_left = interp_restriction_lv3_left; + vec4 edr3_up = interp_restriction_lv3_up; + + vec4 nc45 = edr * fx45; + vec4 nc30 = edr * edr_left * fx30; + vec4 nc60 = edr * edr_up * fx60; + vec4 nc15 = edr * edr_left * edr3_left * fx15; + vec4 nc75 = edr * edr_up * edr3_up * fx75; + + vec4 px = le(df(e,f), df(e,h)); + + vec4 nc = nc75 + nc15 + nc30 + nc60 + nc45; + + vec4 final45 = nc45 * fx45; + vec4 final30 = nc30 * fx30; + vec4 final60 = nc60 * fx60; + vec4 final15 = nc15 * fx15; + vec4 final75 = nc75 * fx75; + + vec4 maximo = max(max(max(final15, final75),max(final30, final60)), final45); + + float blend1; + vec3 pix1; + if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;} + else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;} + else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;} + else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;} + + float blend2; + vec3 pix2; + if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;} + else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;} + else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;} + else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;} + + vec3 res1 = mix(E.xyz, pix1, blend1); + vec3 res2 = mix(E.xyz, pix2, blend2); + + vec3 E_mix = (c_df(E.xyz, res2) >= c_df(E.xyz, res1)) ? vec3(1.0, 1.0, 1.0) : vec3(0.0, 0.0, 0.0); + vec3 res = mix(res1, res2, E_mix); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv2-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv2-noblend.sc new file mode 100644 index 00000000000..75541985e36 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv2-noblend.sc @@ -0,0 +1,59 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv2-noblend Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3-noblend.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3-noblend.sc new file mode 100644 index 00000000000..5421eaf2955 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3-noblend.sc @@ -0,0 +1,60 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3-noblend - Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3.sc new file mode 100644 index 00000000000..f4ee1f55ab3 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/vs_xbr-lv3.sc @@ -0,0 +1,60 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR-lv3 - Shader + + Copyright (C) 2011/2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.sc new file mode 100644 index 00000000000..533bfe0f762 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-sharp.sc @@ -0,0 +1,336 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec3 gt3(vec3 A, vec3 B) +{ + return vec3(greaterThan(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 edr = lt(weighted_distance( e, c, g, i, h5, f4, h, f), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 px = le(df(e,f), df(e,h)); + + vec4 P[4]; + P[0] = px.x > 0.0 ? F : H; + P[1] = px.y > 0.0 ? B : F; + P[2] = px.z > 0.0 ? D : B; + P[3] = px.w > 0.0 ? H : D; + + vec4 res = E; + + vec3 threshold = vec3(0.8, 0.42, 0.29); + vec3 xx = vec3(0.0, 0.0, 0.0); + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + vec3 sim1 = gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + vec3 sim2 = gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold); + t = clamp(t, -m, m); + + vec3 s0 = (2.0 * fp.x - 1.0) * t + s; + + res = vec4(s0, 1.0); + + if ((sim1.x > 0.0 || sim1.y > 0.0 || sim1.z > 0.0) && (sim2.x > 0.0 || sim2.y > 0.0 || sim2.z > 0.0)) + { + if (fp.x >= 0.5) + { + if (fp.y >= 0.5) + { + if (edr.x > 0.0 && edr_left.x > 0.0 && edr_up.x > 0.0) + { + res = mix(E , P[0], 0.833333); + } + else if (edr.x > 0.0 && (edr_left.x > 0.0 || edr_up.x > 0.0)) + { + res = mix(E , P[0], 0.75); + } + else if (edr.y > 0.0 && edr_left.y > 0.0 && edr.w > 0.0 && edr_up.w > 0.0) + { + res = mix(E , P[1], 0.25); + res = mix(E , P[3], 0.25); + } + else if (edr.y > 0.0 && edr_left.y > 0.0) + { + res = mix(E , P[1], 0.25); + } + else if (edr.w > 0.0 && edr_up.w > 0.0) + { + res = mix(E , P[3], 0.25); + } + else if (edr.x > 0.0) + { + res = mix(E , P[0], 0.5); + } + } + else + { + if (edr.y > 0.0 && edr_left.y > 0.0 && edr_up.y > 0.0) + { + res = mix(E , P[1], 0.833333); + } + else if (edr.y > 0.0 && (edr_left.y > 0.0 || edr_up.y > 0.0)) + { + res = mix(E , P[1], 0.75); + } + else if (edr.z > 0.0 && edr_left.z > 0.0 && edr.x > 0.0 && edr_up.x > 0.0) + { + res = mix(E , P[2], 0.25); + res = mix(E , P[0], 0.25); + } + else if (edr.z > 0.0 && edr_left.z > 0.0) + { + res = mix(E , P[2], 0.25); + } + else if (edr.x > 0.0 && edr_up.x > 0.0) + { + res = mix(E , P[0], 0.25); + } + else if (edr.y > 0.0) + { + res = mix(E , P[1], 0.5); + } + } + } + else + { + if (fp.y >= 0.5) + { + if (edr.w > 0.0 && edr_left.w > 0.0 && edr_up.w > 0.0) + { + res = mix(E , P[3], 0.833333); + } + else if (edr.w > 0.0 && (edr_left.w > 0.0 || edr_up.w > 0.0)) + { + res = mix(E , P[3], 0.75); + } + else if (edr.x > 0.0 && edr_left.x > 0.0 && edr.z > 0.0 && edr_up.z > 0.0) + { + res = mix(E , P[0], 0.25); + res = mix(E , P[2], 0.25); + } + else if (edr.x > 0.0 && edr_left.x > 0.0) + { + res = mix(E , P[0], 0.25); + } + else if (edr.z > 0.0 && edr_up.z > 0.0) + { + res = mix(E , P[2], 0.25); + } + else if (edr.w > 0.0) + { + res = mix(E , P[3], 0.5); + } + } + else + { + if (edr.z > 0.0 && edr_left.z > 0.0 && edr_up.z > 0.0) + { + res = mix(E , P[2], 0.833333); + } + else if (edr.z > 0.0 && (edr_left.z > 0.0 || edr_up.z > 0.0)) + { + res = mix(E , P[2], 0.75); + } + else if (edr.w > 0.0 && edr_left.w > 0.0 && edr.y > 0.0 && edr_up.y > 0.0) + { + res = mix(E , P[3], 0.25); + res = mix(E , P[1], 0.25); + } + else if (edr.w > 0.0 && edr_left.w > 0.0) + { + res = mix(E , P[3], 0.25); + } + else if (edr.y > 0.0 && edr_up.y > 0.0) + { + res = mix(E , P[1], 0.25); + } + else if (edr.z > 0.0) + { + res = mix(E, P[2], 0.5); + } + } + } + } + + gl_FragColor = vec4(res.xyz, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.sc new file mode 100644 index 00000000000..ea58584408b --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2-gamma.sc @@ -0,0 +1,265 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta1 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5); + +// Constants used with gamma correction. +#define InputGamma 2.4 +#define OutputGamma 2.2 + +#define GAMMA_IN(color) pow(color, vec3(InputGamma, InputGamma, InputGamma)) +#define GAMMA_OUT(color) pow(color, vec3(1.0 / OutputGamma, 1.0 / OutputGamma, 1.0 / OutputGamma)) + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 lt_coeff2(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ge_coeff2(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec3 gt3(vec3 A, vec3 B) +{ + return vec3(greaterThan(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 a = c.yzwx; + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * ((lt_coeff2(e,b) + lt_coeff2(e,d) + ge_coeff2(e,a)) * (lt_coeff2(f,f4) + lt_coeff2(f,c) + lt_coeff2(h,h5) + lt_coeff2(h,g))) * ( ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 fx45 = smoothstep(Co - delta, Co + delta, fx); + vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left); + vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up); + + vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 nc45 = edr * fx45; + vec4 nc30 = edr * edr_left * fx30; + vec4 nc60 = edr * edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res = E.xyz; + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + t = clamp(t, -m, m); + + res = (2.0 * fp.x - 1.0) * t + s; + + vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0); + + float blend = 0.0; + vec3 pix = res; + + float final45 = dot(nc45, fx45); + float final30 = dot(nc30, fx30); + float final60 = dot(nc60, fx60); + + float maximo = max(max(final30, final60), final45); + + if (nc.x > 0.0) {pix = px.x > 0.0 ? F.xyz : H.xyz; blend = maximo;} + else if (nc.y > 0.0) {pix = px.y > 0.0 ? B.xyz : F.xyz; blend = maximo;} + else if (nc.z > 0.0) {pix = px.z > 0.0 ? D.xyz : B.xyz; blend = maximo;} + else if (nc.w > 0.0) {pix = px.w > 0.0 ? H.xyz : D.xyz; blend = maximo;} + + res = GAMMA_IN(res); + pix = GAMMA_IN(pix); + + res = mix(res, pix, blend); + + gl_FragColor = vec4(clamp(GAMMA_OUT(res), 0.0, 1.0), 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.sc new file mode 100644 index 00000000000..a4e59937d54 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v2.sc @@ -0,0 +1,255 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - Dithering preserved + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5); + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 lt_coeff2(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ge_coeff2(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec3 gt3(vec3 A, vec3 B) +{ + return vec3(greaterThan(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 a = c.yzwx; + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * ((lt_coeff2(e,b) + lt_coeff2(e,d) + ge_coeff2(e,a)) * (lt_coeff2(f,f4) + lt_coeff2(f,c) + lt_coeff2(h,h5) + lt_coeff2(h,g))) * ( ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 fx45 = smoothstep(Co - delta, Co + delta, fx); + vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left); + vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up); + + vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 nc45 = edr * fx45; + vec4 nc30 = edr * edr_left * fx30; + vec4 nc60 = edr * edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res = E.xyz; + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + t = clamp(t, -m, m); + + res = (2.0 * fp.x - 1.0) * t + s; + + vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0); + + float blend = 0.0; + vec3 pix = res; + + float final45 = dot(nc45, fx45); + float final30 = dot(nc30, fx30); + float final60 = dot(nc60, fx60); + + float maximo = max(max(final30, final60), final45); + + if (nc.x > 0.0) {pix = px.x > 0.0 ? F.xyz : H.xyz; blend = maximo;} + else if (nc.y > 0.0) {pix = px.y > 0.0 ? B.xyz : F.xyz; blend = maximo;} + else if (nc.z > 0.0) {pix = px.z > 0.0 ? D.xyz : B.xyz; blend = maximo;} + else if (nc.w > 0.0) {pix = px.w > 0.0 ? H.xyz : D.xyz; blend = maximo;} + + res = mix(res, pix, blend); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.sc new file mode 100644 index 00000000000..254e8d878cb --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4-gamma.sc @@ -0,0 +1,281 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5); +const float sharpness = 0.65; + +// Constants used with gamma correction. +#define InputGamma 2.4 +#define OutputGamma 2.2 + +#define GAMMA_IN(color) pow(color, vec3(InputGamma, InputGamma, InputGamma)) +#define GAMMA_OUT(color) pow(color, vec3(1.0 / OutputGamma, 1.0 / OutputGamma, 1.0 / OutputGamma)) + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 lt_coeff2(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ge_coeff2(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec3 gt3(vec3 A, vec3 B) +{ + return vec3(greaterThan(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 a = c.yzwx; + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 fx45 = smoothstep(Co - delta, Co + delta, fx); + vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left); + vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up); + + vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 nc45 = edr * fx45; + vec4 nc30 = edr * edr_left * fx30; + vec4 nc60 = edr * edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res = E.xyz; + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s0 = (2.0 * fp.x - 1.0) * t + s; + + vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0); + + float blend1 = 0.0; + float blend2 = 0.0; + + vec4 final45 = nc45 * fx45; + vec4 final30 = nc30 * fx30; + vec4 final60 = nc60 * fx60; + + vec4 maximo = max(max(final30, final60), final45); + + vec3 pix1 = vec3(0.0, 0.0, 0.0); + if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;} + else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;} + else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;} + else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;} + + vec3 pix2 = vec3(0.0, 0.0, 0.0); + if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;} + else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;} + else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;} + else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;} + + E.xyz = GAMMA_IN(E.xyz); + s0 = GAMMA_IN(s0); + + vec3 res1 = mix(s0, GAMMA_IN(pix1), blend1); + vec3 res2 = mix(s0, GAMMA_IN(pix2), blend2); + + res = mix(res1, res2, step(c_df(E.xyz, res1), c_df(E.xyz, res2))); + + gl_FragColor = vec4(clamp(GAMMA_OUT(res), 0.0, 1.0), 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.sc new file mode 100644 index 00000000000..e3791fed702 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4.sc @@ -0,0 +1,271 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - v4 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5); +const float sharpness = 0.65; + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 lt_coeff2(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ge_coeff2(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec3 gt3(vec3 A, vec3 B) +{ + return vec3(greaterThan(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 a = c.yzwx; + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 fx45 = smoothstep(Co - delta, Co + delta, fx); + vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left); + vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up); + + vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 nc45 = edr * fx45; + vec4 nc30 = edr * edr_left * fx30; + vec4 nc60 = edr * edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res = E.xyz; + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s0 = (2.0 * fp.x - 1.0) * t + s; + + vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0); + + float blend1 = 0.0; + float blend2 = 0.0; + + vec4 final45 = nc45 * fx45; + vec4 final30 = nc30 * fx30; + vec4 final60 = nc60 * fx60; + + vec4 maximo = max(max(final30, final60), final45); + + vec3 pix1 = vec3(0.0, 0.0, 0.0); + if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;} + else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;} + else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;} + else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;} + + vec3 pix2 = vec3(0.0, 0.0, 0.0); + if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;} + else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;} + else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;} + else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;} + + vec3 res1 = mix(s0, pix1, blend1); + vec3 res2 = mix(s0, pix2, blend2); + + res = mix(res1, res2, step(c_df(E.xyz, res1), c_df(E.xyz, res2))); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.sc new file mode 100644 index 00000000000..858342d25c6 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v4b.sc @@ -0,0 +1,256 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8b+ReverseAA (semi-rounded) Shader - v4 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5); +const float sharpness = 0.65; + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 a = c.yzwx; + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(h,d) + lt_coeff(e,i) * ge_coeff(f,i4) * ge_coeff(h,i5) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 fx45 = smoothstep(Co - delta, Co + delta, fx); + vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left); + vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up); + + vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 nc45 = edr * fx45; + vec4 nc30 = edr * edr_left * fx30; + vec4 nc60 = edr * edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res = E.xyz; + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s0 = (2.0 * fp.x - 1.0) * t + s; + + vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0); + + float blend1 = 0.0; + float blend2 = 0.0; + + vec4 final45 = nc45 * fx45; + vec4 final30 = nc30 * fx30; + vec4 final60 = nc60 * fx60; + + vec4 maximo = max(max(final30, final60), final45); + + vec3 pix1 = vec3(0.0, 0.0, 0.0); + if (nc.x > 0.0) {pix1 = px.x > 0.0 ? F.xyz : H.xyz; blend1 = maximo.x;} + else if (nc.y > 0.0) {pix1 = px.y > 0.0 ? B.xyz : F.xyz; blend1 = maximo.y;} + else if (nc.z > 0.0) {pix1 = px.z > 0.0 ? D.xyz : B.xyz; blend1 = maximo.z;} + else if (nc.w > 0.0) {pix1 = px.w > 0.0 ? H.xyz : D.xyz; blend1 = maximo.w;} + + vec3 pix2 = vec3(0.0, 0.0, 0.0); + if (nc.w > 0.0) {pix2 = px.w > 0.0 ? H.xyz : D.xyz; blend2 = maximo.w;} + else if (nc.z > 0.0) {pix2 = px.z > 0.0 ? D.xyz : B.xyz; blend2 = maximo.z;} + else if (nc.y > 0.0) {pix2 = px.y > 0.0 ? B.xyz : F.xyz; blend2 = maximo.y;} + else if (nc.x > 0.0) {pix2 = px.x > 0.0 ? F.xyz : H.xyz; blend2 = maximo.x;} + + vec3 res1 = mix(s0, pix1, blend1); + vec3 res2 = mix(s0, pix2, blend2); + + res = mix(res1, res2, step(c_df(E.xyz, res1), c_df(E.xyz, res2))); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.sc new file mode 100644 index 00000000000..1a4ad25e765 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid-v5-gamma.sc @@ -0,0 +1,288 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 delta = vec4(0.5, 0.5, 0.5, 0.5); +const float sharpness = 0.65; + +// Constants used with gamma correction. +#define InputGamma 2.4 +#define OutputGamma 2.2 + +#define GAMMA_IN(color) pow(color, vec3(InputGamma, InputGamma, InputGamma)) +#define GAMMA_OUT(color) pow(color, vec3(1.0 / OutputGamma, 1.0 / OutputGamma, 1.0 / OutputGamma)) + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 lt_coeff2(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 lt_coeff3(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(5.0, 5.0, 5.0, 5.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec3 gt3(vec3 A, vec3 B) +{ + return vec3(greaterThan(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 a = c.yzwx; + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 fx45 = smoothstep(Co - delta, Co + delta, fx); + vec4 fx30 = smoothstep(Cx - delta, Cx + delta, fx_left); + vec4 fx60 = smoothstep(Cy - delta, Cy + delta, fx_up); + + vec4 edr = lt((weighted_distance(e, c, g, i, h5, f4, h, f) + 3.5), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 nc45 = edr * fx45; + vec4 nc30 = edr * edr_left * fx30; + vec4 nc60 = edr * edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec3 res = E.xyz; + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, sharpness * abs(bb)); + m = min(m, sharpness * abs(cc)); + t = clamp(t, -m, m); + + vec3 s0 = (2.0 * fp.x - 1.0) * t + s; + + vec4 nc = clamp(nc30 + nc60 + nc45, 0.0, 1.0); + + float blend = 0.0; + + vec4 r1 = mix(e, f, edr); + + vec4 yeseq3 = vec4(0.0, 0.0, 0.0, 0.0); + + vec3 pix; + vec4 lt_res = lt_coeff3(r1,e); + if (lt_res.x > 0.0 && lt_res.y > 0.0 && lt_res.z > 0.0) + { + yeseq3 = vec4(1.0, 1.0, 1.0, 1.0); + pix = res = s0; + } + else + { + pix = res = E.xyz; + } + + vec4 yes = (yeseq3 * lt_coeff2(e, mix(f, h, px))); + + vec4 final45 = nc45 * fx45; + vec4 final30 = nc30 * fx30; + vec4 final60 = nc60 * fx60; + + vec4 maximo = max(max(final30, final60), final45); + + if (nc.x > 0.0) {pix = px.x > 0.0 ? F.xyz : H.xyz; blend = maximo.x; if (yes.x > 0.0) pix = res = s0; else res = E.xyz;} + else if (nc.y > 0.0) {pix = px.y > 0.0 ? B.xyz : F.xyz; blend = maximo.y; if (yes.y > 0.0) pix = res = s0; else res = E.xyz;} + else if (nc.z > 0.0) {pix = px.z > 0.0 ? D.xyz : B.xyz; blend = maximo.z; if (yes.z > 0.0) pix = res = s0; else res = E.xyz;} + else if (nc.w > 0.0) {pix = px.w > 0.0 ? H.xyz : D.xyz; blend = maximo.w; if (yes.w > 0.0) pix = res = s0; else res = E.xyz;} + + res = GAMMA_IN(res); + pix = GAMMA_IN(pix); + + res = mix(res, pix, blend); + + gl_FragColor = vec4(clamp(GAMMA_OUT(res), 0.0, 1.0), 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.sc new file mode 100644 index 00000000000..bf3af2de385 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/fs_2xbr-hybrid.sc @@ -0,0 +1,341 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 u_tex_size0; + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +vec4 lt_coeff(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ge_coeff(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), vec4(15.0, 15.0, 15.0, 15.0))); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec3 lt3(vec3 A, vec3 B) +{ + return vec3(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec3 le3(vec3 A, vec3 B) +{ + return vec3(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec3 gt3(vec3 A, vec3 B) +{ + return vec3(greaterThan(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 interp_restriction_lv1 = clamp((ne(e,f) * ne(e,h) * (ge_coeff(f,b) * ge_coeff(f,c) + ge_coeff(h,d) * ge_coeff(h,g) + lt_coeff(e,i) * (ge_coeff(f,f4) * ge_coeff(f,i4) + ge_coeff(h,h5) * ge_coeff(h,i5)) + lt_coeff(e,g) + lt_coeff(e,c))), 0.0, 1.0); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 edr = lt(weighted_distance( e, c, g, i, h5, f4, h, f), weighted_distance( h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up; + + vec4 px = le(df(e,f), df(e,h)); + + vec4 P[4]; + P[0] = px.x > 0.0 ? F : H; + P[1] = px.y > 0.0 ? B : F; + P[2] = px.z > 0.0 ? D : B; + P[3] = px.w > 0.0 ? H : D; + + vec4 res = E; + + vec3 threshold = vec3(0.4, 0.4, 0.4); + vec3 xx = vec3(0.0, 0.0, 0.0); + + vec3 n1 = B1.xyz; + vec3 n2 = B.xyz; + vec3 s = E.xyz; + vec3 n3 = H.xyz; + vec3 n4 = H5.xyz; + + vec3 aa = n2 - n1; + vec3 bb = s - n2; + vec3 cc = n3 - s; + vec3 dd = n4 - n3; + + vec3 t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + vec3 m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + vec3 sim1 = (gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold) + le3(abs(bb) * 2.0, xx) + le3(abs(cc) * 2.0, xx)); + t = clamp(t, -m, m); + + vec3 s1 = (2.0 * fp.y - 1.0) * t + s; + + n1 = D0.xyz; + n2 = D.xyz; + s = s1; + n3 = F.xyz; + n4 = F4.xyz; + + aa = n2 - n1; + bb = s - n2; + cc = n3 - s; + dd = n4 - n3; + + t = (7.0 * (bb + cc) - 3.0 * (aa + dd)) / 16.0; + m = mix(2.0 * (1.0 - s), 2.0 * s, lt3(s, vec3(0.5, 0.5, 0.5))); + + m = min(m, 2.0 * abs(bb)); + m = min(m, 2.0 * abs(cc)); + vec3 sim2 = (gt3(abs(bb) * 2.0, threshold) + gt3(abs(cc) * 2.0, threshold) + le3(abs(bb) * 2.0, xx) + le3(abs(cc) * 2.0, xx)); + t = clamp(t, -m, m); + + vec3 s0 = (2.0 * fp.x - 1.0) * t + s; + + res = vec4(s0, 1.0); + + if ((sim1.x > 0.0 || sim1.y > 0.0 || sim1.z > 0.0) && (sim2.x > 0.0 || sim2.y > 0.0 || sim2.z > 0.0)) + { + if (fp.x >= 0.5) + { + if (fp.y >= 0.5) + { + if (edr.x > 0.0 && edr_left.x > 0.0 && edr_up.x > 0.0) + { + res = mix(E , P[0], 0.833333); + } + else if (edr.x > 0.0 && (edr_left.x > 0.0 || edr_up.x > 0.0)) + { + res = mix(E , P[0], 0.75); + } + else if (edr.y > 0.0 && edr_left.y > 0.0 && edr.w > 0.0 && edr_up.w > 0.0) + { + res = mix(E , P[1], 0.25); + res = mix(E , P[3], 0.25); + } + else if (edr.y > 0.0 && edr_left.y > 0.0) + { + res = mix(E , P[1], 0.25); + } + else if (edr.w > 0.0 && edr_up.w > 0.0) + { + res = mix(E , P[3], 0.25); + } + else if (edr.x > 0.0) + { + res = mix(E , P[0], 0.5); + } + } + else + { + if (edr.y > 0.0 && edr_left.y > 0.0 && edr_up.y > 0.0) + { + res = mix(E , P[1], 0.833333); + } + else if (edr.y > 0.0 && (edr_left.y > 0.0 || edr_up.y > 0.0)) + { + res = mix(E , P[1], 0.75); + } + else if (edr.z > 0.0 && edr_left.z > 0.0 && edr.x > 0.0 && edr_up.x > 0.0) + { + res = mix(E , P[2], 0.25); + res = mix(E , P[0], 0.25); + } + else if (edr.z > 0.0 && edr_left.z > 0.0) + { + res = mix(E , P[2], 0.25); + } + else if (edr.x > 0.0 && edr_up.x > 0.0) + { + res = mix(E , P[0], 0.25); + } + else if (edr.y > 0.0) + { + res = mix(E , P[1], 0.5); + } + } + } + else + { + if (fp.y >= 0.5) + { + if (edr.w > 0.0 && edr_left.w > 0.0 && edr_up.w > 0.0) + { + res = mix(E , P[3], 0.833333); + } + else if (edr.w > 0.0 && (edr_left.w > 0.0 || edr_up.w > 0.0)) + { + res = mix(E , P[3], 0.75); + } + else if (edr.x > 0.0 && edr_left.x > 0.0 && edr.z > 0.0 && edr_up.z > 0.0) + { + res = mix(E , P[0], 0.25); + res = mix(E , P[2], 0.25); + } + else if (edr.x > 0.0 && edr_left.x > 0.0) + { + res = mix(E , P[0], 0.25); + } + else if (edr.z > 0.0 && edr_up.z > 0.0) + { + res = mix(E , P[2], 0.25); + } + else if (edr.w > 0.0) + { + res = mix(E , P[3], 0.5); + } + } + else + { + if (edr.z > 0.0 && edr_left.z > 0.0 && edr_up.z > 0.0) + { + res = mix(E , P[2], 0.833333); + } + else if (edr.z > 0.0 && (edr_left.z > 0.0 || edr_up.z > 0.0)) + { + res = mix(E , P[2], 0.75); + } + else if (edr.w > 0.0 && edr_left.w > 0.0 && edr.y > 0.0 && edr_up.y > 0.0) + { + res = mix(E , P[3], 0.25); + res = mix(E , P[1], 0.25); + } + else if (edr.w > 0.0 && edr_left.w > 0.0) + { + res = mix(E , P[3], 0.25); + } + else if (edr.y > 0.0 && edr_up.y > 0.0) + { + res = mix(E , P[1], 0.25); + } + else if (edr.z > 0.0) + { + res = mix(E, P[2], 0.5); + } + } + } + } + + gl_FragColor = vec4(res.xyz, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/varying.def.sc index c65b5426733..92c3034f498 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-lv1-noblend/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/varying.def.sc @@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0); vec3 a_position : POSITION; vec4 a_color0 : COLOR0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.sc new file mode 100644 index 00000000000..339c44e284c --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-sharp.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.sc new file mode 100644 index 00000000000..9d5468107dd --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2-gamma.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta1 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.sc new file mode 100644 index 00000000000..8e73b14f713 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v2.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - Dithering preserved + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.sc new file mode 100644 index 00000000000..b4509adf38c --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4-gamma.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.sc new file mode 100644 index 00000000000..b00c03fbce3 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - v4 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.sc new file mode 100644 index 00000000000..2a33ced4126 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v4b.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8b+ReverseAA (semi-rounded) Shader - v4 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.sc new file mode 100644 index 00000000000..b4509adf38c --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid-v5-gamma.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.8c+ReverseAA (squared) Shader - beta3 + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.sc new file mode 100644 index 00000000000..339c44e284c --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-hybrid/vs_2xbr-hybrid.sc @@ -0,0 +1,72 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:GPL-2.0+ +// copyright-holders:Hyllian + +/* + Hyllian's 2xBR v3.7c+ReverseAA (squared) Shader + + Copyright (C) 2011/2012 Hyllian/Jararaca - sergiogdb@gmail.com +*/ + +/* + * ReverseAA part of the code + * + * Copyright (c) 2012, Christoph Feck <christoph@maxiom.de> + * 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. + * + * 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. + * + */ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + // This line fix a bug in ATI cards. + vec2 texCoord = a_texcoord0 + vec2(0.0000001, 0.0000001); + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.sc new file mode 100644 index 00000000000..5af6ea86cc4 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-a-pass0.sc @@ -0,0 +1,159 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 A (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +#define round(X) floor((X)+0.5) + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const float y_weight = 48.0; +const float u_weight = 7.0; +const float v_weight = 6.0; +const mat4 yuv = mat4( + 0.299, 0.587, 0.114, 0.0, + -0.169, -0.331, 0.499, 0.0, + 0.499, -0.418, -0.0813, 0.0, + 0.0, 0.0, 0.0, 0.0 +); + +const mat4 yuv_weighted = mat4( + 48.0 * vec4( 0.299, 0.587, 0.114, 0.0), + 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), + 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0), + 0.0 * vec4( 0.0, 0.0, 0.0, 0.0) +); +const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4); + +vec3 remapTo01(vec3 v, vec3 low, vec3 high) +{ + return saturate((v - low) / (high-low)); +} + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h)); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr; + + vec3 info; + + info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0)); + info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0)); + info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0)); + + gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.sc new file mode 100644 index 00000000000..668922ec18c --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass0.sc @@ -0,0 +1,174 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 Accuracy - pass0 Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +uniform vec4 XBR_EQ_THRESHOLD; +uniform vec4 XBR_LV2_COEFFICIENT; + +#define XBR_RED_COEF 17.0 +#define XBR_GREEN_COEF 20.0 +#define XBR_BLUE_COEF 3.0 + +#define coef XBR_LV2_COEFFICIENT.xxxx + +const vec4 dtt = vec4(65536.0, 256.0, 1.0, 0.0); + +vec4 remapTo01(vec4 v, vec4 low, vec4 high) +{ + return saturate((v - low)/(high-low)); +} + +float df1(vec4 A, vec4 B) +{ + float rmean = (A.r + B.r) / 2.0; + vec4 diff = A - B; + vec4 K = vec4(XBR_RED_COEF + rmean, XBR_GREEN_COEF, XBR_BLUE_COEF - rmean, 0.0); + + return sqrt(dot(K * diff, diff)); +} + +vec4 df(mat4 A, mat4 B) +{ + return vec4(df1(A[0],B[0]), df1(A[1],B[1]), df1(A[2],B[2]), df1(A[3],B[3])); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 lt4(mat4 A, mat4 B) +{ + return vec4(lessThan(df(A, B), XBR_EQ_THRESHOLD.xxxx)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(mat4 a, mat4 b, mat4 c, mat4 d, mat4 e, mat4 f, mat4 g, mat4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b_ = mul(mat4(B, D, H, F), dtt); + vec4 c_ = mul(mat4(C, A, G, I), dtt); + vec4 e_ = mul(mat4(E, E, E, E), dtt); + vec4 d_ = b_.yzwx; + vec4 f_ = b_.wxyz; + vec4 g_ = c_.zwxy; + vec4 h_ = b_.zwxy; + vec4 i_ = c_.wxyz; + + vec4 i4_ = mul(mat4(I4, C1, A0, G5), dtt); + vec4 i5_ = mul(mat4(I5, C4, A1, G0), dtt); + vec4 h5_ = mul(mat4(H5, F4, B1, D0), dtt); + vec4 f4_ = h5_.yzwx; + + mat4 b = mat4(B, D, H, F); + mat4 c = mat4(C, A, G, I); + mat4 e = mat4(E, E, E, E); + mat4 d = mat4(D, H, F, B); + mat4 f = mat4(F, B, D, H); + mat4 g = mat4(G, I, C, A); + mat4 h = mat4(H, F, B, D); + mat4 i = mat4(I, C, A, G); + + mat4 i4 = mat4(I4, C1, A0, G5); + mat4 i5 = mat4(I5, C4, A1, G0); + mat4 h5 = mat4(H5, F4, B1, D0); + mat4 f4 = mat4(F4, B1, D0, H5); + + vec4 interp_restriction_lv1 = ne(e_,f_) * ne(e_,h_); + vec4 interp_restriction_lv2_left = ne(e_,g_) * ne(d_,g_); + vec4 interp_restriction_lv2_up = ne(e_,c_) * ne(b_,c_); + + vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f); + vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i); + + vec4 one = vec4(1.0, 1.0, 1.0, 1.0); + vec4 edri = le(wd1,wd2) * interp_restriction_lv1; + vec4 edr = clamp(lt(wd1,wd2) * ((one - edri.yzwx) + (one - edri.wxyz)) * interp_restriction_lv1, 0.0, 1.0); + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr * (one - edri.yzwx) * lt4(e, c); + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr * (one - edri.wxyz) * lt4(e, g); + + vec4 info; + info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0)); + info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0)); + info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0)); + info.w = dot(edri, vec4(8.0, 4.0, 2.0, 1.0)); + + gl_FragColor = remapTo01(info, vec4(0.0, 0.0, 0.0, 0.0), vec4(255.0, 255.0, 255.0, 255.0)); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.sc new file mode 100644 index 00000000000..a32605fca4e --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-accuracy-pass1.sc @@ -0,0 +1,160 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 Accuracy - pass1 Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); +SAMPLER2D(ORIG_texture, 1); + +uniform vec4 XBR_SCALE; +uniform vec4 u_tex_size0; + +#define XBR_RED_COEF 17.0 +#define XBR_GREEN_COEF 20.0 +#define XBR_BLUE_COEF 3.0 + +#define round(X) floor((X)+0.5) + +const vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); +const vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); +const vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); +const vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); +const vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); +const vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); +const vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); +const vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); +const vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); +const vec4 Ci = vec4(0.25, 0.25, 0.25, 0.25); + + +float df1(vec4 A, vec4 B) +{ + float rmean = (A.r + B.r)/2.0; + vec4 diff = A - B; + vec4 K = vec4(XBR_RED_COEF+rmean, XBR_GREEN_COEF, XBR_BLUE_COEF-rmean, 0.0); + + return sqrt(dot(K * diff, diff)); +} + +vec4 df(mat4 A, mat4 B) +{ + return vec4(df1(A[0],B[0]), df1(A[1],B[1]), df1(A[2],B[2]), df1(A[3],B[3])); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 remapFrom01(vec4 v, vec4 low, vec4 high) +{ + return round(mix(low, high, v)); +} + +vec4 unpack_info(float i) +{ + vec4 info; + float frac_val = fract(i / 2.0f); + info.w = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.z = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.y = round(frac_val); + info.x = i / 2.0f - frac_val; + + return info; +} + +void main() +{ + vec4 delta = 1.0 / XBR_SCALE.xxxx; + vec4 deltaL = vec4(0.5, 1.0, 0.5, 1.0) / XBR_SCALE.xxxx; + vec4 deltaU = deltaL.yxwz; + + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 B = texture2D(ORIG_texture, v_texcoord1.xy); + vec4 D = texture2D(ORIG_texture, v_texcoord2.xw); + vec4 E = texture2D(ORIG_texture, v_texcoord2.yw); + vec4 F = texture2D(ORIG_texture, v_texcoord2.zw); + vec4 H = texture2D(ORIG_texture, v_texcoord1.xw); + + mat4 b = mat4(B, D, H, F); + mat4 e = mat4(E, E, E, E); + mat4 d = mat4(D, H, F, B); + mat4 f = mat4(F, B, D, H); + mat4 h = mat4(H, F, B, D); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec4 fx45i = saturate((fx + delta -Co - Ci) / (2.0 * delta )); + vec4 fx45 = saturate((fx + delta -Co ) / (2.0 * delta )); + vec4 fx30 = saturate((fx_left + deltaL -Cx ) / (2.0 * deltaL)); + vec4 fx60 = saturate((fx_up + deltaU -Cy ) / (2.0 * deltaU)); + + vec4 info = texture2D(decal, v_texcoord0); + + vec4 i = remapFrom01(info, vec4(0.0, 0.0, 0.0, 0.0), vec4(255.0, 255.0, 255.0, 255.0)); + + vec4 edr = unpack_info(i.x); + vec4 edr_left = unpack_info(i.y); + vec4 edr_up = unpack_info(i.z); + vec4 edri = unpack_info(i.w); + + fx45i = edri * fx45i; + fx45 = edr * fx45; + fx30 = edr_left * fx30; + fx60 = edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec4 maximos = max(max(fx30, fx60), max(fx45, fx45i)); + + vec4 res1 = E; + res1 = mix(res1, mix(H, F, px.x), maximos.x); + res1 = mix(res1, mix(B, D, px.z), maximos.z); + + vec4 res2 = E; + res2 = mix(res2, mix(F, B, px.y), maximos.y); + res2 = mix(res2, mix(D, H, px.w), maximos.w); + + vec3 E_mix = (df1(E, res2) >= df1(E, res1)) ? vec3(1.0, 1.0, 1.0) : vec3(0.0, 0.0, 0.0); + vec3 res = mix(res1.xyz, res2.xyz, E_mix); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.sc new file mode 100644 index 00000000000..9f9c2836454 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-b-pass0.sc @@ -0,0 +1,160 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 B (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +#define round(X) floor((X)+0.5) + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const float y_weight = 48.0; +const float u_weight = 7.0; +const float v_weight = 6.0; +const mat4 yuv = mat4( + 0.299, 0.587, 0.114, 0.0, + -0.169, -0.331, 0.499, 0.0, + 0.499, -0.418, -0.0813, 0.0, + 0.0, 0.0, 0.0, 0.0 +); + +const mat4 yuv_weighted = mat4( + 48.0 * vec4( 0.299, 0.587, 0.114, 0.0), + 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), + 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0), + 0.0 * vec4( 0.0, 0.0, 0.0, 0.0) +); +const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4); + +vec3 remapTo01(vec3 v, vec3 low, vec3 high) +{ + return saturate((v - low) / (high-low)); +} + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0] ); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0] ); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0] ); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0] ); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0] ); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0] ); + vec4 f4 = h5.yzwx; + + vec4 interp_restriction_lv1 = ne(e,f) * ne(e,h) * ( ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c)); + vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g); + vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c); + + interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0); + + vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr; + + vec3 info; + info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0)); + info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0)); + info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0)); + + gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.sc new file mode 100644 index 00000000000..05b2398ad9c --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-c-pass0.sc @@ -0,0 +1,158 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 C (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +#define round(X) floor((X)+0.5) + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const float y_weight = 48.0; +const float u_weight = 7.0; +const float v_weight = 6.0; +const mat4 yuv = mat4( + 0.299, 0.587, 0.114, 0.0, + -0.169, -0.331, 0.499, 0.0, + 0.499, -0.418, -0.0813, 0.0, + 0.0, 0.0, 0.0, 0.0 +); + +const mat4 yuv_weighted = mat4( + 48.0 * vec4( 0.299, 0.587, 0.114, 0.0), + 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), + 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0), + 0.0 * vec4( 0.0, 0.0, 0.0, 0.0) +); +const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4); + +vec3 remapTo01(vec3 v, vec3 low, vec3 high) +{ + return saturate((v - low) / (high-low)); +} + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 interp_restriction_lv1 = clamp(ne(e,f) * ne(e,h) * (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c)), 0.0, 1.0); + vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g); + vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c); + + vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr; + + vec3 info; + info.x = dot(edr, vec4(8.0, 4.0, 2.0, 1.0)); + info.y = dot(edr_left, vec4(8.0, 4.0, 2.0, 1.0)); + info.z = dot(edr_up, vec4(8.0, 4.0, 2.0, 1.0)); + + gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.sc new file mode 100644 index 00000000000..c168b2622a7 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-d-pass0.sc @@ -0,0 +1,163 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 D (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +#define round(X) floor((X)+0.5) + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const float y_weight = 48.0; +const float u_weight = 7.0; +const float v_weight = 6.0; +const mat4 yuv = mat4( + 0.299, 0.587, 0.114, 0.0, + -0.169, -0.331, 0.499, 0.0, + 0.499, -0.418, -0.0813, 0.0, + 0.0, 0.0, 0.0, 0.0 +); + +const mat4 yuv_weighted = mat4( + 48.0 * vec4( 0.299, 0.587, 0.114, 0.0), + 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), + 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0), + 0.0 * vec4( 0.0, 0.0, 0.0, 0.0) +); +const vec4 delta = vec4(0.4, 0.4, 0.4, 0.4); + +vec3 remapTo01(vec3 v, vec3 low, vec3 high) +{ + return saturate((v - low) / (high-low)); +} + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 c1 = i4.yzwx; + vec4 g0 = i5.wxyz; + + vec4 interp_restriction_lv1 = (ne(e,f) * ne(e,h) * (ge(f,b) * ge(h,d) + lt(e,i) * ge(f,i4) * ge(h,i5) + lt(e,g) + lt(e,c)) * (ne(f,f4) * ne(f,i) + ne(h,h5) * ne(h,i) + ne(h,g) + ne(f,c) + lt(b,c1) * lt(d,g0))); + vec4 interp_restriction_lv2_left = (ne(e,g) * ne(d,g)); + vec4 interp_restriction_lv2_up = (ne(e,c) * ne(b,c)); + + interp_restriction_lv1 = clamp(interp_restriction_lv1, 0.0, 1.0); + + vec4 edr = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr; + + vec3 info; + info.x = dot(vec4(edr ), vec4(8.0, 4.0, 2.0, 1.0)); + info.y = dot(vec4(edr_left), vec4(8.0, 4.0, 2.0, 1.0)); + info.z = dot(vec4(edr_up ), vec4(8.0, 4.0, 2.0, 1.0)); + + gl_FragColor = vec4(remapTo01(info, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)), 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.sc new file mode 100644 index 00000000000..c46dd90ba0a --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-noblend-pass1.sc @@ -0,0 +1,162 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 - noblend - pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); +SAMPLER2D(ORIG_texture, 1); + +uniform vec4 u_tex_size0; + +#define round(X) floor((X) + 0.5) + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const float y_weight = 48.0; +const float u_weight = 7.0; +const float v_weight = 6.0; +const mat4 yuv = mat4( + 0.299, 0.587, 0.114, 0.0, + -0.169, -0.331, 0.499, 0.0, + 0.499, -0.418, -0.0813, 0.0, + 0.0, 0.0, 0.0, 0.0 +); + +const mat4 yuv_weighted = mat4( + 48.0 * vec4( 0.299, 0.587, 0.114, 0.0), + 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), + 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0), + 0.0 * vec4( 0.0, 0.0, 0.0, 0.0) +); + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + + +vec3 remapFrom01(vec3 v, vec3 low, vec3 high) +{ + return round(mix(low, high, v)); +} + +vec4 unpack_info(float i) +{ + vec4 info; + float frac_val = fract(i / 2.0f); + info.w = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.z = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.y = round(frac_val); + info.x = i / 2.0f - frac_val; + + return info; +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 B = texture2D(ORIG_texture, v_texcoord1.xy); + vec4 D = texture2D(ORIG_texture, v_texcoord2.xw); + vec4 E = texture2D(ORIG_texture, v_texcoord2.yw); + vec4 F = texture2D(ORIG_texture, v_texcoord2.zw); + vec4 H = texture2D(ORIG_texture, v_texcoord1.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0] ); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0] ); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 h = b.zwxy; + + vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bo = vec4( 1.0, 1.0, -1.0,-1.0 ); + vec4 Co = vec4( 1.5, 0.5, -0.5, 0.5 ); + vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 Bx = vec4( 0.5, 2.0, -0.5,-2.0 ); + vec4 Cx = vec4( 1.0, 1.0, -0.5, 0.0 ); + vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 ); + vec4 By = vec4( 2.0, 0.5, -2.0,-0.5 ); + vec4 Cy = vec4( 2.0, 0.0, -1.0, 0.5 ); + + // These inequations define the line below which interpolation occurs. + vec4 fx = ge(Co, Ao*fp.y+Bo*fp.x); + vec4 fx_left = ge(Cx, Ax*fp.y+Bx*fp.x); + vec4 fx_up = ge(Cy, Ay*fp.y+By*fp.x); + + vec4 info = texture2D(decal, v_texcoord0); + + vec3 i = remapFrom01(info.xyz, vec3(0.0, 0.0, 0.0), vec3(15.0, 15.0, 15.0)); + + vec4 edr = unpack_info(i.x); + vec4 edr_left = unpack_info(i.y); + vec4 edr_up = unpack_info(i.z); + + fx = edr * fx; + fx_left = edr_left * fx_left; + fx_up = edr_up * fx_up; + + vec4 nc = max(fx, max(fx_left, fx_up)); + vec4 px = le(df(e,f), df(e,h)); + + vec3 res1 = nc.x > 0.0 ? px.x > 0.0 ? F.xyz : H.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : E.xyz; + vec3 res2 = nc.w > 0.0 ? px.w > 0.0 ? H.xyz : D.xyz : nc.z > 0.0 ? px.z > 0.0 ? D.xyz : B.xyz : nc.y > 0.0 ? px.y > 0.0 ? B.xyz : F.xyz : E.xyz; + + vec2 df12 = abs(mul(mat3(res1, res2, vec3(0.0, 0.0, 0.0)), yuv_weighted[0].xyz).xy - e.xy); + vec3 res = mix(res1, res2, step(df12.x, df12.y)); + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.sc new file mode 100644 index 00000000000..b34ad4fe005 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/fs_xbr-lv2-pass1.sc @@ -0,0 +1,185 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 - pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); +SAMPLER2D(ORIG_texture, 1); + +uniform vec4 u_tex_size0; +uniform vec4 u_tex_size1; +uniform vec4 u_target_dims; + +#define round(X) floor((X)+0.5) + +const float coef = 2.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const float y_weight = 48.0; +const float u_weight = 7.0; +const float v_weight = 6.0; +const mat4 yuv = mat4( + 0.299, 0.587, 0.114, 0.0, + -0.169, -0.331, 0.499, 0.0, + 0.499, -0.418, -0.0813, 0.0, + 0.0, 0.0, 0.0, 0.0 +); + +const mat4 yuv_weighted = mat4( + 48.0 * vec4( 0.299, 0.587, 0.114, 0.0), + 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), + 6.0 * vec4( 0.499, -0.418, -0.0813, 0.0), + 0.0 * vec4( 0.0, 0.0, 0.0, 0.0) +); + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + + +vec3 remapFrom01(vec3 v, vec3 low, vec3 high) +{ + return round(mix(low, high, v)); +} + +vec4 unpack_info(float i) +{ + vec4 info; + float frac_val = fract(i / 2.0f); + info.w = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.z = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.y = round(frac_val); + info.x = i / 2.0f - frac_val; + + return info; +} + +void main() +{ + vec2 fp = fract(v_texcoord0 * u_tex_size0.xy); + + vec4 B = texture2D(ORIG_texture, v_texcoord1.xy); + vec4 D = texture2D(ORIG_texture, v_texcoord2.xw); + vec4 E = texture2D(ORIG_texture, v_texcoord2.yw); + vec4 F = texture2D(ORIG_texture, v_texcoord2.zw); + vec4 H = texture2D(ORIG_texture, v_texcoord1.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 h = b.zwxy; + + vec4 Ao = vec4(1.0, -1.0, -1.0, 1.0); + vec4 Bo = vec4(1.0, 1.0, -1.0, -1.0); + vec4 Co = vec4(1.5, 0.5, -0.5, 0.5); + vec4 Ax = vec4(1.0, -1.0, -1.0, 1.0); + vec4 Bx = vec4(0.5, 2.0, -0.5, -2.0); + vec4 Cx = vec4(1.0, 1.0, -0.5, 0.0); + vec4 Ay = vec4(1.0, -1.0, -1.0, 1.0); + vec4 By = vec4(2.0, 0.5, -2.0, -0.5); + vec4 Cy = vec4(2.0, 0.0, -1.0, 0.5); + + // These inequations define the line below which interpolation occurs. + vec4 fx = (Ao*fp.y+Bo*fp.x); + vec4 fx_left = (Ax*fp.y+Bx*fp.x); + vec4 fx_up = (Ay*fp.y+By*fp.x); + + vec2 delta = vec2(u_tex_size1.x / u_target_dims.x, 0.5 * u_tex_size1.x / u_target_dims.x); + + vec4 fx45 = saturate((fx + delta.xxxx - Co) / (2.0 * delta.xxxx)); + vec4 fx30 = saturate((fx_left + delta.yxyx - Cx) / (2.0 * delta.yxyx)); + vec4 fx60 = saturate((fx_up + delta.xyxy - Cy) / (2.0 * delta.xyxy)); + + vec4 info = texture2D(decal, v_texcoord0); + + vec3 i = remapFrom01(info.xyz, vec3(0.0, 0.0, 0.0), vec3(255.0, 255.0, 255.0)); + + vec4 edr = unpack_info(i.x); + vec4 edr_left = unpack_info(i.y); + vec4 edr_up = unpack_info(i.z); + + fx45 = edr * fx45; + fx30 = edr_left * fx30; + fx60 = edr_up * fx60; + + vec4 px = le(df(e,f), df(e,h)); + + vec4 maximo = max(max(fx30, fx60), fx45); + + mat4 pix = mat4(mix(E, mix(H, F, px.x), maximo.x), mix(E, mix(F, B, px.y), maximo.y), mix(E, mix(B, D, px.z), maximo.z), mix(E, mix(D, H, px.w), maximo.w)); + vec4 pixel = mul(pix, yuv_weighted[0]); + + vec4 diff = df(pixel,e); + + vec3 res = pix[0].xyz; + float mx = diff.x; + + if (diff.y > mx) + { + res = pix[1].xyz; + mx = diff.y; + } + if (diff.z > mx) + { + res = pix[2].xyz; + mx = diff.z; + } + if (diff.w > mx) + { + res = pix[3].xyz; + } + + gl_FragColor = vec4(res, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/varying.def.sc index c65b5426733..92c3034f498 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-4p/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/varying.def.sc @@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0); vec3 a_position : POSITION; vec4 a_color0 : COLOR0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.sc new file mode 100644 index 00000000000..3a80bf6f7bb --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-a-pass0.sc @@ -0,0 +1,60 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 A (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.sc new file mode 100644 index 00000000000..4cd8b064523 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass0.sc @@ -0,0 +1,59 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 Accuracy - pass0 Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.sc new file mode 100644 index 00000000000..c20050aa1f4 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-accuracy-pass1.sc @@ -0,0 +1,55 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 Accuracy - pass1 Shader + + Copyright (C) 2011-2016 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size1; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size1.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xyyy + vec4(0.0, -dy, 0.0, dy); // B + v_texcoord2 = v_texcoord0.xxxy + vec4(-dx, 0.0, dx, 0.0); //D E F + // H + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.sc new file mode 100644 index 00000000000..5515f4f4904 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-b-pass0.sc @@ -0,0 +1,60 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 B (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.sc new file mode 100644 index 00000000000..9d0b7161844 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-c-pass0.sc @@ -0,0 +1,60 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 C (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.sc new file mode 100644 index 00000000000..8f9b4f316d9 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-d-pass0.sc @@ -0,0 +1,60 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 D (squared) - pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.sc new file mode 100644 index 00000000000..86df31a48e4 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-noblend-pass1.sc @@ -0,0 +1,54 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 - noblend - pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +uniform vec4 u_tex_size1; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size1.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xyyy + vec4( 0.0, -dy, 0.0, dy); // B + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); //D E F + // H + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.sc new file mode 100644 index 00000000000..d678e8b0541 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv2-multipass/vs_xbr-lv2-pass1.sc @@ -0,0 +1,56 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR LV2 - pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size1; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size1.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xyyy + vec4( 0.0, -dy, 0.0, dy); // B + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); //D E F + // H + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.sc new file mode 100644 index 00000000000..e9328bb4015 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass0.sc @@ -0,0 +1,216 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR level 3 pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +const float coef = 2.0; +const float cf = 4.0; +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +vec4 remapTo01(vec4 v, vec4 high) +{ + return (v/high); +} + +vec4 remapFrom01(vec4 v, vec4 high) +{ + return (high*v + vec4(0.5, 0.5, 0.5, 0.5)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +#define FILTRO(EDR0, EDR, LEFT, UP, LEFT3, UP3, PX0, PX3, PX1, LIN0, LIN3, LIN1, PX) \ + if (LEFT > 0.0 && UP == 0.0) \ + { \ + PX0 = vec2(0.0, PX); \ + PX3 = vec2( PX, 0.0); \ + if (LEFT3 > 0.0) \ + { \ + LIN0 = vec4(0.0, 1.0, 0.0, 0.0);\ + LIN3 = vec4(1.0, 0.0, 0.0, 0.0);\ + } \ + else \ + { \ + LIN0 = vec4(0.0, 0.0, 1.0, 0.0);\ + LIN3 = vec4(0.0, 1.0, 1.0, 0.0);\ + } \ + } \ + else if (UP > 0.0 && LEFT == 0.0) \ + { \ + PX0 = vec2(0.0, 1.0 - PX); \ + PX1 = vec2(1.0 - PX, 0.0); \ + if (UP3 > 0.0) \ + { \ + LIN0 = vec4(0.0, 1.0, 0.0, 1.0);\ + LIN1 = vec4(1.0, 0.0, 0.0, 1.0);\ + } \ + else \ + { \ + LIN0 = vec4(0.0, 0.0, 1.0, 1.0);\ + LIN1 = vec4(0.0, 1.0, 1.0, 1.0);\ + } \ + } \ + else if (EDR > 0.0) \ + { \ + LEFT = UP = LEFT3 = UP3 = 0.0; \ + PX0 = vec2(0.0, PX); \ + LIN0 = vec4(0.0, 0.0, 0.0, 1.0); \ + } \ + else if (EDR0 > 0.0) \ + { \ + LEFT = UP = LEFT3 = UP3 = 0.0; \ + PX0 = vec2(0.0, PX); \ + LIN0 = vec4(0.0, 0.0, 0.0, 0.0); \ + } \ + + + +void main() +{ + vec2 px0, px1, px2, px3; + + vec4 A1 = texture2D(decal, v_texcoord1.xw); + vec4 B1 = texture2D(decal, v_texcoord1.yw); + vec4 C1 = texture2D(decal, v_texcoord1.zw); + + vec4 A = texture2D(decal, v_texcoord2.xw); + vec4 B = texture2D(decal, v_texcoord2.yw); + vec4 C = texture2D(decal, v_texcoord2.zw); + + vec4 D = texture2D(decal, v_texcoord3.xw); + vec4 E = texture2D(decal, v_texcoord3.yw); + vec4 F = texture2D(decal, v_texcoord3.zw); + + vec4 G = texture2D(decal, v_texcoord4.xw); + vec4 H = texture2D(decal, v_texcoord4.yw); + vec4 I = texture2D(decal, v_texcoord4.zw); + + vec4 G5 = texture2D(decal, v_texcoord5.xw); + vec4 H5 = texture2D(decal, v_texcoord5.yw); + vec4 I5 = texture2D(decal, v_texcoord5.zw); + + vec4 A0 = texture2D(decal, v_texcoord6.xy); + vec4 D0 = texture2D(decal, v_texcoord6.xz); + vec4 G0 = texture2D(decal, v_texcoord6.xw); + + vec4 C4 = texture2D(decal, v_texcoord7.xy); + vec4 F4 = texture2D(decal, v_texcoord7.xz); + vec4 I4 = texture2D(decal, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 c1 = i4.yzwx; + vec4 g0 = i5.wxyz; + vec4 b1 = h5.zwxy; + vec4 d0 = h5.wxyz; + + vec4 interp_restriction_lv0 = ne(e,f) * ne(e,h); + vec4 interp_restriction_lv1 = (ge(f,b) * ge(f,c) + ge(h,d) * ge(h,g) + lt(e,i) * (ge(f,f4) * ge(f,i4) + ge(h,h5) * ge(h,i5)) + lt(e,g) + lt(e,c)); + vec4 interp_restriction_lv2_left = ne(e,g) * ne(d,g); + vec4 interp_restriction_lv2_up = ne(e,c) * ne(b,c); + vec4 interp_restriction_lv3_left = ne(e,g0) * ne(d0,g0); + vec4 interp_restriction_lv3_up = ne(e,c1) * ne(b1,c1); + + vec4 edr0 = lt(weighted_distance(e, c, g, i, h5, f4, h, f), weighted_distance(h, d, i5, f, i4, b, e, i)) * interp_restriction_lv0; + + vec4 edr = edr0 * interp_restriction_lv1; + vec4 edr_left = le(coef * df(f,g), df(h,c)) * interp_restriction_lv2_left * edr; + vec4 edr_up = ge(df(f,g), coef * df(h,c)) * interp_restriction_lv2_up * edr; + vec4 edr3_left = le(cf * df(f,g0), df(h,c1)) * interp_restriction_lv3_left * edr_left; + vec4 edr3_up = ge(df(f,g0), cf * df(h,c1)) * interp_restriction_lv3_up * edr_up; + + vec4 px = le(df(e,f), df(e,h)); + + vec4 lin0 = vec4(1.0, 1.0, 1.0, 1.0); + vec4 lin1 = lin0; + vec4 lin2 = lin0; + vec4 lin3 = lin0; + + FILTRO(edr0.x, edr.x, edr_left.x, edr_up.x, edr3_left.x, edr3_up.x, px0, px3, px1, lin0, lin3, lin1, px.x); + FILTRO(edr0.y, edr.y, edr_left.y, edr_up.y, edr3_left.y, edr3_up.y, px1, px0, px2, lin1, lin0, lin2, px.y); + FILTRO(edr0.z, edr.z, edr_left.z, edr_up.z, edr3_left.z, edr3_up.z, px2, px1, px3, lin2, lin1, lin3, px.z); + FILTRO(edr0.w, edr.w, edr_left.w, edr_up.w, edr3_left.w, edr3_up.w, px3, px2, px0, lin3, lin2, lin0, px.w); + + vec4 info = mul(vec4(1.0, 2.0, 4.0, 8.0), mat4( edr3_left, + edr3_up, + px0.x, px1.x, px2.x, px3.x, + px0.y, px1.y, px2.y, px3.y)); + + info += mul(vec4(16.0, 32.0, 64.0, 128.0), mat4(lin0.x, lin1.x, lin2.x, lin3.x, + lin0.y, lin1.y, lin2.y, lin3.y, + lin0.z, lin1.z, lin2.z, lin3.z, + lin0.w, lin1.w, lin2.w, lin3.w)); + + gl_FragColor = vec4(remapTo01(info, vec4(255.0, 255.0, 255.0, 255.0))); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.sc new file mode 100644 index 00000000000..df6d0a72265 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/fs_xbr-lv3-pass1.sc @@ -0,0 +1,180 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR level 3 pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); +SAMPLER2D(ORIG_texture, 1); + +uniform vec4 u_tex_size0; + +#define round(X) floor((X)+0.5) + +const mat4 sym_vectors = mat4(1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); + +const vec3 lines0 = vec3(1.0, 1.0, 0.75); +const vec3 lines1 = vec3(1.0, 1.0, 0.5); +const vec3 lines2 = vec3(2.0, 1.0, 0.5); +const vec3 lines3 = vec3(1.0, 2.0, 0.5); +const vec3 lines4 = vec3(3.0, 1.0, 0.5); +const vec3 lines5 = vec3(1.0, 3.0, 0.5); + +const vec3 lines6 = vec3(-1.0, 2.0, 0.5); +const vec3 lines7 = vec3( 2.0, -1.0, 0.5); +const vec3 lines8 = vec3(-1.0, 3.0, 0.5); +const vec3 lines9 = vec3( 3.0, -1.0, 0.5); + +const vec3 lines10 = vec3(3.0, 1.0, 1.5); +const vec3 lines11 = vec3(1.0, 3.0, 1.5); + +float remapFrom01(float v, float high) +{ + return (high*v + 0.5); +} + + +vec3 remapFrom01(vec3 v, vec3 low, vec3 high) +{ + return round(mix(low, high, v)); +} + +vec4 unpack_info(float i) +{ + vec4 info; + float frac_val = fract(i / 2.0f); + info.w = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.z = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.y = round(frac_val); + info.x = i / 2.0f - frac_val; + + return info; +} + +void main() +{ + vec2 pos = fract(v_texcoord0 * u_tex_size0.xy) - vec2(0.5, 0.5); // pos = pixel position + vec4 dir = vec4(sign(pos), 0.0, 0.0); // dir = pixel direction + + vec2 g1 = dir.xy *( saturate(-dir.y * dir.x) * v_texcoord1.zw + saturate( dir.y * dir.x) * v_texcoord1.xy); + vec2 g2 = dir.xy *( saturate( dir.y * dir.x) * v_texcoord1.zw + saturate(-dir.y * dir.x) * v_texcoord1.xy); + + vec4 F = texture2D(ORIG_texture, v_texcoord0 +g1); + vec4 B = texture2D(ORIG_texture, v_texcoord0 -g2); + vec4 D = texture2D(ORIG_texture, v_texcoord0 -g1); + vec4 H = texture2D(ORIG_texture, v_texcoord0 +g2); + vec4 E = texture2D(ORIG_texture, v_texcoord0 ); + + vec4 F4 = texture2D(ORIG_texture, v_texcoord0 +2.0*g1); + vec4 I = texture2D(ORIG_texture, v_texcoord0 +g1+g2); + vec4 H5 = texture2D(ORIG_texture, v_texcoord0 +2.0*g2); + + vec4 icomp = round(saturate(mul(dir, sym_vectors))); // choose info component + float info = remapFrom01(dot(texture2D(decal, v_texcoord0 ), icomp), 255.0); // retrieve 1st pass info + float info_nr = remapFrom01(dot(texture2D(decal, v_texcoord0 + g1), icomp), 255.0); // 1st pass info from neighbor r + float info_nd = remapFrom01(dot(texture2D(decal, v_texcoord0 + g2), icomp), 255.0); // 1st pass info from neighbor d + + info = info / 2.0 - fract(info / 2.0); + info = info / 2.0 - fract(info / 2.0); + vec2 px; + + float frac_val = fract(info / 2.0); + px.x = round(frac_val); + info = info / 2.0 - frac_val; + + frac_val = fract(info / 2.0); + px.y = round(frac_val); + info = info / 2.0 - frac_val; + + vec4 flags = unpack_info(info); // retrieve 1st pass flags + + frac_val = fract(info_nr / 2.0); + float edr3_nrl = round(frac_val); + info_nr = info_nr / 2.0 - frac_val; + info_nr = info_nr / 2.0 - fract(info_nr / 2.0); + info_nr = info_nr / 2.0 - fract(info_nr / 2.0); + + frac_val = fract(info_nr / 2.0); + float pxr = round(frac_val); + info_nr = info_nr / 2.0 - frac_val; + + info_nd = info_nd / 2.0 - fract(info_nd / 2.0); + + frac_val = fract(info_nd / 2.0); + float edr3_ndu = round(frac_val); + info_nd = info_nd / 2.0 - frac_val; + + info_nd = info_nd / 2.0 - fract(info_nd / 2.0); + + frac_val = fract(info_nd / 2.0); + float pxd = round(frac_val); + info_nd = info_nd / 2.0 - frac_val; + + float aux = round(dot(vec4(8.0, 4.0, 2.0, 1.0), flags)); + vec3 slep; + + if (aux >= 6.0) + { + slep = (aux == 6.0 ? lines6 : (aux == 7.0 ? lines7 : (aux == 8.0 ? lines8 : (aux == 9.0 ? lines9 : (aux == 10.0 ? lines10 : lines11))))); + } + else + { + slep = (aux == 0.0 ? lines0 : (aux == 1.0 ? lines1 : (aux == 2.0 ? lines2 : (aux == 3.0 ? lines3 : (aux == 4.0 ? lines4 : lines5))))); + } + + vec2 fp = (dir.x * dir.y) > 0.0 ? abs(pos) : abs(pos.yx); + + vec3 fp1 = vec3(fp.yx, -1); + + vec3 color = E.xyz; + float fx; + + if (aux < 10.0) + { + fx = saturate(dot(fp1, slep) / (2.0 * v_texcoord2.x) + 0.5); + color = mix(E.xyz, mix(mix(H.xyz, F.xyz, px.y), mix(D.xyz, B.xyz, px.y), px.x), fx); // interpolate if there's edge + } + else if (edr3_nrl > 0.0) + { + fx = saturate(dot(fp1, lines10) / (2.0 * v_texcoord2.x) + 0.5); + color = mix(E.xyz, mix(I.xyz, F4.xyz, pxr), fx); // interpolate if there's edge + } + else if (edr3_ndu > 0.0) + { + fx = saturate(dot(fp1, lines11) / (2.0 * v_texcoord2.x) + 0.5); + color = mix(E.xyz, mix(H5.xyz, I.xyz, pxd), fx); // interpolate if there's edge + } + + gl_FragColor = vec4(color, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/varying.def.sc index c65b5426733..92c3034f498 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/super-4xbr-3d-6p-smoother/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/varying.def.sc @@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0); vec3 a_position : POSITION; vec4 a_color0 : COLOR0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.sc new file mode 100644 index 00000000000..d4420512bd4 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass0.sc @@ -0,0 +1,60 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR level 3 pass0 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + Incorporates some of the ideas from SABR shader. Thanks to Joshua Street. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx,-2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.sc new file mode 100644 index 00000000000..edfd9fa3dd9 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-lv3-multipass/vs_xbr-lv3-pass1.sc @@ -0,0 +1,55 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + Hyllian's xBR level 3 pass1 Shader + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "common.sh" + +uniform vec4 u_tex_size1; +uniform vec4 u_target_dims; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A3 B3 C3 + // A1 B1 C1 + //A2 A0 A B C C4 C6 + //D2 D0 D E F F4 F6 + //G2 G0 G H I I4 I6 + // G5 H5 I5 + // G7 H7 I7 + + vec2 ps = 1.0 / u_tex_size1.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = vec4(dx, 0, 0, dy); // F H + v_texcoord2 = vec4(u_tex_size1.x / u_target_dims.x, 0.5 * u_tex_size1.x / u_target_dims.x, 0.0, 0.0); + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.sc new file mode 100644 index 00000000000..fe2e3188052 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass1.sc @@ -0,0 +1,208 @@ +$input v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass1 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); + +#define round(X) floor((X)+0.5) +#define TEX(dx,dy) texture2D(decal, v_texcoord0 + vec2(dx,dy) * v_texcoord1.xy) + +const float cf2 = 2.0; +const float cf3 = 4.0; +const float cf4 = 4.0; +const vec4 eq_thresholdold = vec4(15.0, 15.0, 15.0, 15.0); +const vec4 eq_threshold = vec4( 2.0, 2.0, 2.0, 2.0); +const vec4 eq_threshold3 = vec4(25.0, 25.0, 25.0, 25.0); +const vec4 yuv_weight = vec4( 4.0, 1.0, 2.0, 0.0); +const mat4 yuvT = mat4(0.299, -0.169, 0.499, 0.0, 0.587, -0.331, -0.418, 0.0, 0.114, 0.499, -0.0813, 0.0, 0.0, 0.0, 0.0, 0.0); +const mat4 yuv = mat4(0.299, 0.587, 0.114, 0.0, -0.169, -0.331, 0.499, 0.0, 0.499, -0.418, -0.0813, 0.0, 0.0, 0.0, 0.0, 0.0); +const mat4 yuv_weighted = mat4(4.0 * vec4(0.299, 0.587, 0.114, 0.0), 2.0 * vec4(-0.169, -0.331, 0.499, 0.0), vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 maximo = vec4(255.0, 255.0, 255.0, 255.0); + + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +vec4 rd(vec4 A, vec4 B, vec4 C, vec4 D) +{ + return vec4(greaterThan(df(C,D) / (df(A,B) + 0.000000001), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 id(vec4 A, vec4 B, vec4 C, vec4 D) +{ + return vec4(greaterThan(df(C,D), df(A,B))); +} + +vec4 nid(vec4 A, vec4 B, vec4 C, vec4 D) +{ + return vec4(lessThanEqual(df(C,D), df(A,B))); +} + +vec4 remapTo01(vec4 v, vec4 high) +{ + return (v/high); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 ltt(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), eq_threshold)); +} + +vec4 get(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), eq_threshold3)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec4 A3 = TEX(-1,-3); vec4 B3 = TEX( 0,-3); vec4 C3 = TEX( 1,-3); + vec4 A1 = TEX(-1,-2); vec4 B1 = TEX( 0,-2); vec4 C1 = TEX( 1,-2); + vec4 A2 = TEX(-3,-1); vec4 A0 = TEX(-2,-1); vec4 A = TEX(-1,-1); + vec4 B = TEX( 0,-1); vec4 C = TEX( 1,-1); vec4 C4 = TEX( 2,-1); vec4 C6 = TEX( 3,-1); + vec4 D2 = TEX(-3, 0); vec4 D0 = TEX(-2, 0); vec4 D = TEX(-1, 0); vec4 E = TEX( 0, 0); + vec4 F = TEX( 1, 0); vec4 F4 = TEX( 2, 0); vec4 F6 = TEX( 3, 0); + vec4 G2 = TEX(-3, 1); vec4 G0 = TEX(-2, 1); vec4 G = TEX(-1, 1); vec4 H = TEX( 0, 1); + vec4 I = TEX( 1, 1); vec4 I4 = TEX( 2, 1); vec4 I6 = TEX( 3, 1); + vec4 G5 = TEX(-1, 2); vec4 H5 = TEX( 0, 2); vec4 I5 = TEX( 1, 2); + vec4 G7 = TEX(-1, 3); vec4 H7 = TEX( 0, 3); vec4 I7 = TEX( 1, 3); + + mat4 bdhf = mul(mat4(B, D, H, F), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 b = mul(bdhf, yuv_weight); + + bdhf = mul(mat4(C, A, G, I), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 c = mul(bdhf, yuv_weight); + + bdhf = mul(mat4(E, E, E, E), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 e = mul(bdhf, yuv_weight); + + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + bdhf = mul(mat4(I4, C1, A0, G5), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 i4 = mul(bdhf, yuv_weight); + + bdhf = mul(mat4(I5, C4, A1, G0), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 i5 = mul(bdhf, yuv_weight); + + bdhf = mul(mat4(H5, F4, B1, D0), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 h5 = mul(bdhf, yuv_weight); + + vec4 f4 = h5.yzwx; + + vec4 c1 = i4.yzwx; + vec4 g0 = i5.wxyz; + vec4 b1 = h5.zwxy; + vec4 d0 = h5.wxyz; + + bdhf = mul(mat4(I6, C3, A2, G7), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 i6 = mul(bdhf, yuv_weight); + + bdhf = mul(mat4(I7, C6, A3, G2), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 i7 = mul(bdhf, yuv_weight); + + bdhf = mul(mat4(H7, F6, B3, D2), yuvT); + bdhf = mat4(abs(bdhf[0]), abs(bdhf[1]), abs(bdhf[2]), abs(bdhf[3])); + vec4 h7 = mul(bdhf, yuv_weight); + + vec4 f6 = h7.yzwx; + + vec4 c3 = i6.yzwx; + vec4 g2 = i7.wxyz; + vec4 b3 = h7.zwxy; + vec4 d2 = h7.wxyz; + + vec4 interp_restriction_lv1 = ne(e,f ) * ne(e ,h ); + vec4 interp_restriction_lv2_left = ne(e,g ) * ne(d ,g ) * (ltt(e, d ) + ltt(h ,g )); + vec4 interp_restriction_lv2_up = ne(e,c ) * ne(b ,c ) * (ltt(e, b ) + ltt(f ,c )); + vec4 interp_restriction_lv3_left = ne(e,g0) * ne(d0,g0) * (ltt(d ,d0) + ltt(g ,g0)); + vec4 interp_restriction_lv3_up = ne(e,c1) * ne(b1,c1) * (ltt(b ,b1) + ltt(c ,c1)); + vec4 interp_restriction_lv4_left = ne(e,g2) * ne(d2,g2) * (ltt(d0,d2) + ltt(g0,g2)); + vec4 interp_restriction_lv4_up = ne(e,c3) * ne(b3,c3) * (ltt(b1,b3) + ltt(c1,c3)); + + vec4 wd1 = weighted_distance(e, c, g, i, h5, f4, h, f); + vec4 wd2 = weighted_distance(h, d, i5, f, i4, b, e, i); + + vec4 edr0 = le(wd1, wd2) * interp_restriction_lv1; + vec4 edr = lt(wd1, wd2) * interp_restriction_lv1 * (ge(f,b) * nid(f,c,f,b) + ge(h,d) * nid(h,g,h,d) + lt(e,g) + lt(e,c)); + vec4 edr_left = le(cf2 * df(f,g ), df(h,c )) * interp_restriction_lv2_left * edr; + vec4 edr_up = ge(df(f,g ), cf2 * df(h,c )) * interp_restriction_lv2_up * edr; + vec4 edr3_left = le(cf3 * df(f,g0), df(h,c1)) * interp_restriction_lv3_left * edr_left; + vec4 edr3_up = ge(df(f,g0), cf3 * df(h,c1)) * interp_restriction_lv3_up * edr_up; + vec4 edr4_left = le(cf4 * df(f,g2), df(h,c3)) * interp_restriction_lv4_left * edr3_left; + vec4 edr4_up = ge(df(f,g2), cf4 * df(h,c3)) * interp_restriction_lv4_up * edr3_up; + + vec4 info; + info.x = (edr4_left.x > 0.0 && edr4_up.x == 0.0) ? 8.0 : ((edr4_up.x > 0.0 && edr4_left.x == 0.0) ? 7.0 : ((edr3_left.x > 0.0 && edr3_up.x == 0.0) ? 6.0 : ((edr3_up.x > 0.0 && edr3_left.x == 0.0) ? 5.0 : ((edr_left.x > 0.0 && edr_up.x == 0.0) ? 4.0 : ((edr_up.x > 0.0 && edr_left.x == 0.0) ? 3.0 : (edr.x > 0.0 ? 2.0 : (edr0.x > 0.0 ? 1.0 : 0.0))))))); + info.y = (edr4_left.y > 0.0 && edr4_up.y == 0.0) ? 8.0 : ((edr4_up.y > 0.0 && edr4_left.y == 0.0) ? 7.0 : ((edr3_left.y > 0.0 && edr3_up.y == 0.0) ? 6.0 : ((edr3_up.y > 0.0 && edr3_left.y == 0.0) ? 5.0 : ((edr_left.y > 0.0 && edr_up.y == 0.0) ? 4.0 : ((edr_up.y > 0.0 && edr_left.y == 0.0) ? 3.0 : (edr.y > 0.0 ? 2.0 : (edr0.y > 0.0 ? 1.0 : 0.0))))))); + info.z = (edr4_left.z > 0.0 && edr4_up.z == 0.0) ? 8.0 : ((edr4_up.z > 0.0 && edr4_left.z == 0.0) ? 7.0 : ((edr3_left.z > 0.0 && edr3_up.z == 0.0) ? 6.0 : ((edr3_up.z > 0.0 && edr3_left.z == 0.0) ? 5.0 : ((edr_left.z > 0.0 && edr_up.z == 0.0) ? 4.0 : ((edr_up.z > 0.0 && edr_left.z == 0.0) ? 3.0 : (edr.z > 0.0 ? 2.0 : (edr0.z > 0.0 ? 1.0 : 0.0))))))); + info.w = (edr4_left.w > 0.0 && edr4_up.w == 0.0) ? 8.0 : ((edr4_up.w > 0.0 && edr4_left.w == 0.0) ? 7.0 : ((edr3_left.w > 0.0 && edr3_up.w == 0.0) ? 6.0 : ((edr3_up.w > 0.0 && edr3_left.w == 0.0) ? 5.0 : ((edr_left.w > 0.0 && edr_up.w == 0.0) ? 4.0 : ((edr_up.w > 0.0 && edr_left.w == 0.0) ? 3.0 : (edr.w > 0.0 ? 2.0 : (edr0.w > 0.0 ? 1.0 : 0.0))))))); + + gl_FragColor = vec4(remapTo01(info, maximo)); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.sc new file mode 100644 index 00000000000..b0e0edf7778 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass2.sc @@ -0,0 +1,235 @@ +$input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass2 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); +SAMPLER2D(ORIG_texture, 1); + +#define round(X) floor((X)+0.5) + +const float cf2 = 2.0; +const float cf3 = 4.0; +const float cf4 = 4.0; +const vec4 eq_threshold = vec4(15.0, 15.0, 15.0, 15.0); +const vec4 eq_threshold2 = vec4( 5.0, 5.0, 5.0, 5.0); +const vec4 eq_threshold3 = vec4(25.0, 25.0, 25.0, 25.0); +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 maximo = vec4(255.0, 255.0, 255.0, 255.0); + +vec4 df(vec4 A, vec4 B) +{ + return vec4(abs(A-B)); +} + +vec4 rd(vec4 A, vec4 B, vec4 C, vec4 D) +{ + return vec4(greaterThan(df(C,D) / (df(A,B) + 0.000000001), vec4(2.0, 2.0, 2.0, 2.0))); +} + +vec4 id(vec4 A, vec4 B, vec4 C, vec4 D) +{ + return vec4(greaterThan(df(C,D), df(A,B))); +} + +vec4 nid(vec4 A, vec4 B, vec4 C, vec4 D) +{ + return vec4(lessThanEqual(df(C,D), df(A,B))); +} + +vec4 remapTo01(vec4 v, vec4 high) +{ + return (v/high); +} + +vec4 remapFrom01(vec4 v, vec4 high) +{ + return round(high*v); +} + +vec4 eq(vec4 A, vec4 B) +{ + return vec4(equal(A, B)); +} + +vec4 lt(vec4 A, vec4 B) +{ + return vec4(lessThan(A, B)); +} + +vec4 ltt(vec4 A, vec4 B) +{ + return vec4(lessThan(df(A, B), eq_threshold)); +} + +vec4 get(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(df(A, B), eq_threshold3)); +} + +vec4 le(vec4 A, vec4 B) +{ + return vec4(lessThanEqual(A, B)); +} + +vec4 ge(vec4 A, vec4 B) +{ + return vec4(greaterThanEqual(A, B)); +} + +vec4 gt(vec4 A, vec4 B) +{ + return vec4(greaterThan(A, B)); +} + +vec4 ne(vec4 A, vec4 B) +{ + return vec4(notEqual(A, B)); +} + +vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +vec4 select(vec4 A, vec4 B, vec4 C) +{ + vec4 result; + result.x = ((A.x > 0.0) ? B.x : C.x); + result.y = ((A.y > 0.0) ? B.y : C.y); + result.z = ((A.z > 0.0) ? B.z : C.z); + result.w = ((A.w > 0.0) ? B.w : C.w); + return result; +} + +vec4 pe_check(vec4 pe, vec4 jag, float cf1, float cf2) +{ + pe.x = (pe.x == cf1 || pe.x == cf2) ? (jag.x > 0.0 ? pe.x : (pe.x - 2.0)) : pe.x; + pe.y = (pe.y == cf1 || pe.y == cf2) ? (jag.y > 0.0 ? pe.y : (pe.y - 2.0)) : pe.y; + pe.z = (pe.z == cf1 || pe.z == cf2) ? (jag.z > 0.0 ? pe.z : (pe.z - 2.0)) : pe.z; + pe.w = (pe.w == cf1 || pe.w == cf2) ? (jag.w > 0.0 ? pe.w : (pe.w - 2.0)) : pe.w; + return pe; +} + +void main() +{ + vec4 PA = texture2D(decal, v_texcoord2.xw); + vec4 PB = texture2D(decal, v_texcoord2.yw); + vec4 PC = texture2D(decal, v_texcoord2.zw); + + vec4 PD = texture2D(decal, v_texcoord3.xw); + vec4 PE = texture2D(decal, v_texcoord3.yw); + vec4 PF = texture2D(decal, v_texcoord3.zw); + + vec4 PG = texture2D(decal, v_texcoord4.xw); + vec4 PH = texture2D(decal, v_texcoord4.yw); + vec4 PI = texture2D(decal, v_texcoord4.zw); + + vec4 A1 = texture2D(ORIG_texture, v_texcoord1.xw); + vec4 B1 = texture2D(ORIG_texture, v_texcoord1.yw); + vec4 C1 = texture2D(ORIG_texture, v_texcoord1.zw); + + vec4 A = texture2D(ORIG_texture, v_texcoord2.xw); + vec4 B = texture2D(ORIG_texture, v_texcoord2.yw); + vec4 C = texture2D(ORIG_texture, v_texcoord2.zw); + + vec4 D = texture2D(ORIG_texture, v_texcoord3.xw); + vec4 E = texture2D(ORIG_texture, v_texcoord3.yw); + vec4 F = texture2D(ORIG_texture, v_texcoord3.zw); + + vec4 G = texture2D(ORIG_texture, v_texcoord4.xw); + vec4 H = texture2D(ORIG_texture, v_texcoord4.yw); + vec4 I = texture2D(ORIG_texture, v_texcoord4.zw); + + vec4 G5 = texture2D(ORIG_texture, v_texcoord5.xw); + vec4 H5 = texture2D(ORIG_texture, v_texcoord5.yw); + vec4 I5 = texture2D(ORIG_texture, v_texcoord5.zw); + + vec4 A0 = texture2D(ORIG_texture, v_texcoord6.xy); + vec4 D0 = texture2D(ORIG_texture, v_texcoord6.xz); + vec4 G0 = texture2D(ORIG_texture, v_texcoord6.xw); + + vec4 C4 = texture2D(ORIG_texture, v_texcoord7.xy); + vec4 F4 = texture2D(ORIG_texture, v_texcoord7.xz); + vec4 I4 = texture2D(ORIG_texture, v_texcoord7.xw); + + vec4 b = mul(mat4(B, D, H, F), yuv_weighted[0]); + vec4 c = mul(mat4(C, A, G, I), yuv_weighted[0]); + vec4 e = mul(mat4(E, E, E, E), yuv_weighted[0]); + vec4 d = b.yzwx; + vec4 f = b.wxyz; + vec4 g = c.zwxy; + vec4 h = b.zwxy; + vec4 i = c.wxyz; + + vec4 i4 = mul(mat4(I4, C1, A0, G5), yuv_weighted[0]); + vec4 i5 = mul(mat4(I5, C4, A1, G0), yuv_weighted[0]); + vec4 h5 = mul(mat4(H5, F4, B1, D0), yuv_weighted[0]); + vec4 f4 = h5.yzwx; + + vec4 pe = remapFrom01(PE, maximo); + vec4 pf = remapFrom01(PF, maximo); + vec4 ph = remapFrom01(PH, maximo); + vec4 pb = remapFrom01(PB, maximo); + vec4 pd = remapFrom01(PD, maximo); + + vec4 f2 = vec4(pf.z, pb.w, pd.x, ph.y); + vec4 h2 = vec4(ph.z, pf.w, pb.x, pd.y); + vec4 f1 = vec4(pf.y, pb.z, pd.w, ph.x); + vec4 h3 = vec4(ph.w, pf.x, pb.y, pd.z); + + vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); + vec4 one = vec4(1.0, 1.0, 1.0, 1.0); + vec4 two = vec4(2.0, 2.0, 2.0, 2.0); + vec4 four = vec4(4.0, 4.0, 4.0, 4.0); + vec4 nbrs = select(gt(pe.yzwx, one) + gt(pe.wxyz, one), one, zero); + vec4 jag1 = select(gt( f2, one) + gt( h2, one), one, zero); + vec4 jag2 = select(gt( f2, two) + gt( h2, two), one, zero); + vec4 jag3 = select(gt( f2, four) + gt( h2, four), one, zero); + + pe = pe_check(pe, jag3, 7.0, 8.0); + pe = pe_check(pe, jag2, 5.0, 6.0); + + vec4 jag91 = clamp((id(h,i,e,h) + id(i4,i,f4,i4)) * gt(f2, one) * gt(f1, one), 0.0, 1.0); + vec4 jag92 = clamp((id(f,i,e,f) + id(i5,i,h5,i5)) * gt(h2, one) * gt(h3, one), 0.0, 1.0); + vec4 jag93 = clamp(rd(h,g,e,g) , 0.0, 1.0); + vec4 jag94 = clamp(rd(f,c,e,c) , 0.0, 1.0); + vec4 jag9 = clamp(jag91 * jag93 + jag92 * jag94 , 0.0, 1.0); + + vec4 pe_select = eq(pe, zero) + ((one - nbrs) + jag1) * jag9; + + pe.x = pe_select.x > 0.0 ? pe.x : 1.0; + pe.y = pe_select.y > 0.0 ? pe.y : 1.0; + pe.z = pe_select.z > 0.0 ? pe.z : 1.0; + pe.w = pe_select.w > 0.0 ? pe.w : 1.0; + + gl_FragColor = vec4(remapTo01(pe, maximo)); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.sc new file mode 100644 index 00000000000..00391c77120 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass3.sc @@ -0,0 +1,172 @@ +$input v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass3 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); +SAMPLER2D(ORIG_texture, 1); + +uniform vec4 u_tex_size1; + +#define round(X) floor((X)+0.5) + +const float coef = 2.0; +const float cf = 4.0; +const float eq_threshold = 15.0; +const mat4 yuv_weighted = mat4(48.0 * vec4(0.299, 0.587, 0.114, 0.0), 7.0 * vec4(-0.169, -0.331, 0.499, 0.0), 6.0 * vec4(0.499, -0.418, -0.0813, 0.0), vec4(0.0, 0.0, 0.0, 0.0)); +const vec4 maximo = vec4(255.0, 255.0, 255.0, 255.0); +const vec4 low = vec4(-64.0, -64.0, -64.0, -64.0); +const vec4 high = vec4( 64.0, 64.0, 64.0, 64.0); + +const mat4 sym_vectors = mat4(1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); + +// Bx, Ay, C +const vec3 lines0 = vec3( 4.0, 4.0, 4.0); // 0 NL +const vec3 lines1 = vec3( 4.0, 4.0, 3.0); // 1 LV0 +const vec3 lines2 = vec3( 4.0, 4.0, 2.0); // 2 LV1 +const vec3 lines3 = vec3( 8.0, 4.0, 2.0); // 3 LV2u +const vec3 lines4 = vec3( 4.0, 8.0, 2.0); // 4 LV2l +const vec3 lines5 = vec3(12.0, 4.0, 2.0); // 5 LV3u +const vec3 lines6 = vec3( 4.0,12.0, 2.0); // 6 LV3l +const vec3 lines7 = vec3(16.0, 4.0, 2.0); // 7 LV4u +const vec3 lines8 = vec3( 4.0,16.0, 2.0); // 8 LV4l + +const vec3 lines9 = vec3(12.0, 4.0, 6.0); // 9 LV3u +const vec3 lines10 = vec3( 4.0,12.0, 6.0); // 10 LV3l +const vec3 lines11 = vec3(16.0, 4.0, 6.0); // 11 LV4u +const vec3 lines12 = vec3( 4.0,16.0, 6.0); // 12 LV4l + +vec4 remapTo01(vec4 v, vec4 low, vec4 high) +{ + return saturate((v - low)/(high-low)); +} + +float remapFrom01(float v, float high) +{ + return round(high*v); +} + +float df(float A, float B) +{ + return abs(A-B); +} + +float weighted_distance(float a, float b, float c, float d, float e, float f, float g, float h) +{ + return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h)); +} + +void main() +{ + vec2 pos = fract(v_texcoord0 * u_tex_size1.xy) - vec2(0.5, 0.5); // pos = pixel position + vec4 dir = vec4(sign(pos), 0.0, 0.0); + + vec2 g1 = dir.xy * (saturate(-dir.y * dir.x) * v_texcoord1.zw + saturate( dir.y * dir.x) * v_texcoord1.xy); + vec2 g2 = dir.xy * (saturate( dir.y * dir.x) * v_texcoord1.zw + saturate(-dir.y * dir.x) * v_texcoord1.xy); + + vec4 E = texture2D(ORIG_texture, v_texcoord0 ); + vec4 F = texture2D(ORIG_texture, v_texcoord0 +g1); + vec4 H = texture2D(ORIG_texture, v_texcoord0 +g2); + vec4 I = texture2D(ORIG_texture, v_texcoord0 +g1+g2); + vec4 F4 = texture2D(ORIG_texture, v_texcoord0 +2.0*g1); + vec4 H5 = texture2D(ORIG_texture, v_texcoord0 +2.0*g2); + + float e = dot(E, yuv_weighted[0]); + float f = dot(F, yuv_weighted[0]); + float h = dot(H, yuv_weighted[0]); + float i = dot(I, yuv_weighted[0]); + float f4= dot(F4, yuv_weighted[0]); + float h5= dot(H5, yuv_weighted[0]); + + vec4 icomp = round(saturate(mul(dir, sym_vectors))); // choose info component + + float infoE = remapFrom01(dot(texture2D(decal, v_texcoord0 ), icomp), 255.0); // retrieve 1st pass info + float infoF = remapFrom01(dot(texture2D(decal, v_texcoord0+g1), icomp), 255.0); // 1st pass info from neighbor r + float infoH = remapFrom01(dot(texture2D(decal, v_texcoord0+g2), icomp), 255.0); // 1st pass info from neighbor d + + vec4 lparam; + float px; + vec2 addr; + + if (infoF == 8.0) + { + lparam.xyz = lines12; + px = float(df(f,f4) <= df(f,i)); + addr.x = 2.0 * px + saturate(1.0 - px); + addr.y = saturate(1.0-px); + } + else if (infoH == 7.0) + { + lparam.xyz = lines11; + px = float(df(h,h5) <= df(h,i)); + addr.x = saturate(1.0-px); + addr.y = 2.0 * px + saturate(1.0 - px); + } + else if (infoF == 6.0) + { + lparam.xyz = lines10; + px = float(df(f,f4) <= df(f,i)); + addr.x = 2.0 * px + saturate(1.0 - px); + addr.y = saturate(1.0-px); + } + else if (infoH == 5.0) + { + lparam.xyz = lines9; + px = float(df(h,h5) <= df(h,i)); + addr.x = saturate(1.0 - px); + addr.y = 2.0 * px + saturate(1.0 - px); + } + else + { + px = float(df(e,f) <= df(e,h)); + addr.x = px; + addr.y = saturate(1.0 - px); + + lparam.xyz = (infoE == 8.0) ? lines8 : ((infoE == 7.0) ? lines7 : ((infoE == 6.0) ? lines6 : ((infoE == 5.0) ? lines5 : ((infoE == 4.0) ? lines4 : ((infoE == 3.0) ? lines3 : ((infoE == 2.0) ? lines2 : ((infoE == 1.0) ? lines1 : lines0))))))); + } + + bool inv = ((dir.x * dir.y) < 0.0); + + // Rotate address from relative to absolute. + addr = addr * dir.yx; + addr = (inv ? addr.yx : addr); + + // Rotate straight line equation from relative to absolute. + lparam.xy = lparam.xy * dir.yx; + lparam.xy = (inv ? lparam.yx : lparam.xy); + + addr.x += 2.0; + addr.y += 2.0; + + lparam.w = addr.x * 8.0 + addr.y; + + gl_FragColor = vec4(remapTo01(lparam, low, high)); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.sc new file mode 100644 index 00000000000..535f70a5a7d --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/fs_xbr-mlv4-pass4.sc @@ -0,0 +1,164 @@ +$input v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass3 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +SAMPLER2D(decal, 0); +SAMPLER2D(ORIG_texture, 1); + +uniform vec4 u_tex_size1; +uniform vec4 u_target_size; + +#define round(X) floor((X)+0.5) + +const vec3 bin = vec3( 4.0f, 2.0f, 1.0f); +const vec4 low = vec4(-64.0f, -64.0f, -64.0f, -64.0f); +const vec4 high = vec4( 64.0f, 64.0f, 64.0f, 64.0f); + +const mat4 sym_vectors = mat4 (1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); + +vec4 remapFrom01(vec4 v, vec4 low, vec4 high) +{ + return round(mix(low, high, v)); +} + +float c_df(vec3 c1, vec3 c2) +{ + vec3 df = abs(c1 - c2); + return df.r + df.g + df.b; +} + +vec4 unpack_info(float i) +{ + vec4 info; + float frac_val = fract(i / 2.0f); + info.w = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.z = round(frac_val); + i = i / 2.0f - frac_val; + + frac_val = fract(i / 2.0f); + info.y = round(frac_val); + info.x = i / 2.0f - frac_val; + + return info; +} + +float df(float A, float B) +{ + return abs(A-B); +} + +vec3 color_mix(vec3 c, vec3 color, vec3 E) +{ + return (c_df(c, E) > c_df(color, E) ? c : color); +} + +#define GET_PIXEL(PARAM, PIXEL) \ + info = PARAM; \ + \ + frac_val = fract(info / 2.0); \ + ay.z = round(frac_val); \ + info = info / 2.0 - frac_val; \ + \ + frac_val = fract(info / 2.0); \ + ay.y = round(frac_val); \ + info = info / 2.0 - frac_val; \ + \ + frac_val = fract(info / 2.0); \ + ay.x = round(frac_val); \ + info = info / 2.0 - frac_val; \ + \ + frac_val = fract(info / 2.0); \ + ax.z = round(frac_val); \ + info = info / 2.0 - frac_val; \ + \ + frac_val = fract(info / 2.0); \ + ax.y = round(frac_val); \ + info = info / 2.0 - frac_val; \ + \ + ax.x = round(info); \ + iq.x = dot(ax, bin) - 2.0; \ + iq.y = dot(ay, bin) - 2.0; \ + PIXEL = texture2D(ORIG_texture, v_texcoord0 + iq.x * v_texcoord1.xy + iq.y * v_texcoord1.zw).xyz; \ + + +void main() +{ + float scale_factor = u_target_size.x / u_tex_size1.x; + + vec2 fp = fract(v_texcoord0 * u_tex_size1.xy) - vec2(0.5, 0.5); // pos = pixel position + + vec4 UL = texture2D(decal, v_texcoord0 + 0.25 * v_texcoord1.xy + 0.25 * v_texcoord1.zw); + vec4 UR = texture2D(decal, v_texcoord0 + 0.75 * v_texcoord1.xy + 0.25 * v_texcoord1.zw); + vec4 DL = texture2D(decal, v_texcoord0 + 0.25 * v_texcoord1.xy + 0.75 * v_texcoord1.zw); + vec4 DR = texture2D(decal, v_texcoord0 + 0.75 * v_texcoord1.xy + 0.75 * v_texcoord1.zw); + + vec4 ulparam = remapFrom01(UL, low, high); // retrieve 1st pass info + vec4 urparam = remapFrom01(UR, low, high); // retrieve 1st pass info + vec4 dlparam = remapFrom01(DL, low, high); // retrieve 1st pass info + vec4 drparam = remapFrom01(DR, low, high); // retrieve 1st pass info + + vec4 E = texture2D(ORIG_texture, v_texcoord0); + + float info, frac_val; + vec2 iq; + vec3 ax, ay, PX, PY, PZ, PW; + GET_PIXEL(ulparam.w, PX); + GET_PIXEL(urparam.w, PY); + GET_PIXEL(dlparam.w, PZ); + GET_PIXEL(drparam.w, PW); + + vec3 fp1 = vec3(fp, -1); + + vec4 inc = vec4(abs(ulparam.x / ulparam.y), abs(urparam.x / urparam.y), abs(dlparam.x / dlparam.y), abs(drparam.x / drparam.y)); + vec4 level = max(inc, 1.0 / inc); + + vec4 fx; + fx.x = saturate(dot(fp1, ulparam.xyz) * scale_factor / (8.0 * level.x) + 0.5); + fx.y = saturate(dot(fp1, urparam.xyz) * scale_factor / (8.0 * level.y) + 0.5); + fx.z = saturate(dot(fp1, dlparam.xyz) * scale_factor / (8.0 * level.z) + 0.5); + fx.w = saturate(dot(fp1, drparam.xyz) * scale_factor / (8.0 * level.w) + 0.5); + + vec3 c1 = mix(E.xyz, PX, fx.x); + vec3 c2 = mix(E.xyz, PY, fx.y); + vec3 c3 = mix(E.xyz, PZ, fx.z); + vec3 c4 = mix(E.xyz, PW, fx.w); + + vec3 color = c1; + color = color_mix(c2, color, E.xyz); + color = color_mix(c3, color, E.xyz); + color = color_mix(c4, color, E.xyz); + + gl_FragColor = vec4(color, 1.0); +}
\ No newline at end of file diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/varying.def.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/varying.def.sc index c65b5426733..92c3034f498 100644 --- a/src/osd/modules/render/bgfx/shaders/chains/xbr-hybrid/varying.def.sc +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/varying.def.sc @@ -4,6 +4,9 @@ vec4 v_texcoord1 : TEXCOORD1 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord2 : TEXCOORD2 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord3 : TEXCOORD3 = vec4(0.0, 0.0, 0.0, 0.0); vec4 v_texcoord4 : TEXCOORD4 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord5 : TEXCOORD5 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord6 : TEXCOORD6 = vec4(0.0, 0.0, 0.0, 0.0); +vec4 v_texcoord7 : TEXCOORD7 = vec4(0.0, 0.0, 0.0, 0.0); vec3 a_position : POSITION; vec4 a_color0 : COLOR0; diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.sc new file mode 100644 index 00000000000..bab183ddd30 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass1.sc @@ -0,0 +1,52 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass1 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A3 B3 C3 + // A1 B1 C1 + //A2 A0 A B C C4 C6 + //D2 D0 D E F F4 F6 + //G2 G0 G H I I4 I6 + // G5 H5 I5 + // G7 H7 I7 + + v_texcoord1 = 1.0 / u_tex_size0.xyyy; // F H + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.sc new file mode 100644 index 00000000000..71ebf7d574a --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass2.sc @@ -0,0 +1,59 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4, v_texcoord5, v_texcoord6, v_texcoord7, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass2 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +uniform vec4 u_tex_size0; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A1 B1 C1 + // A0 A B C C4 + // D0 D E F F4 + // G0 G H I I4 + // G5 H5 I5 + + vec2 ps = 1.0 / u_tex_size0.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -2.0*dy); // A1 B1 C1 + v_texcoord2 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, -dy); // A B C + v_texcoord3 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 0.0); // D E F + v_texcoord4 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, dy); // G H I + v_texcoord5 = v_texcoord0.xxxy + vec4( -dx, 0.0, dx, 2.0*dy); // G5 H5 I5 + v_texcoord6 = v_texcoord0.xyyy + vec4(-2.0*dx, -dy, 0.0, dy); // A0 D0 G0 + v_texcoord7 = v_texcoord0.xyyy + vec4( 2.0*dx, -dy, 0.0, dy); // C4 F4 I4 + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.sc new file mode 100644 index 00000000000..19195ba5b27 --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass3.sc @@ -0,0 +1,55 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass3 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +uniform vec4 u_tex_size1; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A3 B3 C3 + // A1 B1 C1 + //A2 A0 A B C C4 C6 + //D2 D0 D E F F4 F6 + //G2 G0 G H I I4 I6 + // G5 H5 I5 + // G7 H7 I7 + + vec2 ps = 1.0 / u_tex_size1.xy; + float dx = ps.x; + float dy = ps.y; + v_texcoord1 = vec4(dx, 0.0, 0.0, dy); // F H + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.sc b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.sc new file mode 100644 index 00000000000..bf9f297ec9d --- /dev/null +++ b/src/osd/modules/render/bgfx/shaders/chains/xbr/xbr-mlv4-multipass/vs_xbr-mlv4-pass4.sc @@ -0,0 +1,53 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_texcoord1, v_color0 + +// license:MIT +// copyright-holders:Hyllian + +/* + + Hyllian's xBR MultiLevel4 Shader - Pass4 + + Copyright (C) 2011-2015 Hyllian - sergiogdb@gmail.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +#include "common.sh" + +uniform vec4 u_tex_size1; + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + + // A3 B3 C3 + // A1 B1 C1 + //A2 A0 A B C C4 C6 + //D2 D0 D E F F4 F6 + //G2 G0 G H I I4 I6 + // G5 H5 I5 + // G7 H7 I7 + + vec2 ps = 1.0 / u_tex_size1.xy; + v_texcoord1 = vec4(ps.x, 0.0, 0.0, ps.y); // F H + v_color0 = a_color0; +} |