Commit Graph

79 Commits

Author SHA1 Message Date
Vas Crabb
44eb5ea3c6 Revert "Updated bgfx, bx and bimg to current upstream versions. (#11493)"
This reverts commit 1c61ccfe84.
2023-09-08 05:14:35 +10:00
Julian Sikorski
1c61ccfe84
Updated bgfx, bx and bimg to current upstream versions. (#11493)
* Reverted "macOS, iOS: Removed OpenGL/OpenGLES support. (commit 4693983242a698eaafed87faf4ffef1789adc8f9).
* Reverted "Fix macOS build" (commit ce2c2c13eda7d699051f75f598e740a447343a88).
* Reverted "macOS: Fixed deprecated warnings." (commit 10a8cb61f882ebc9bb376ee2341d003880b7037f).
* Added bgfx/README.mame explaining deviations from upstream.
2023-09-06 01:10:24 +10:00
MooglyGuy
5671484fc8
Major D3D and BGFX code refactoring and bug fixes: (#10858) [Ryan Holtz]
* render/bgfx: Improved clearing and blending. Added prescale support. Fixes MT07586, MT07587, MT08084.
* render/bgfx: Fixed blend and tint handling. (Fixes Github #1953).
* render/bgfx/blendreader.cpp: Support non-separated blend mode specification for BGFX effects.
* render/bgfx: Reworked how horizontally-padded screen textures are handled. Likely fixes MT08512 and MT08505.
* render/bgfx: Ensure that a texture's width margin is updated in all cases.
* render/d3d/d3dhlsl.cpp: Fixed tinting in HLSL post-processing mode.
* render/d3d/d3dhlsl.cpp: Avoid most redundant state-setting calls. Reduces D3D API calls by about 90% on fruit machine drivers.
* render/d3d/d3dhlsl.cpp: Assign SourceDims and QuadDims uniforms to only those effects that use them.
* machine/laserdsc.cpp: Always add video quad to screen container, adjust tint based on m_videoenable instead.
2023-01-29 03:59:25 +11:00
Miodrag Milanović
812e6094f4
Update BGFX, BX and BIMG (#10789)
* Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2023-01-05 09:32:40 -05:00
R. Belmont
94b1e168b2
Revert "Update BGFX, BX and BIMG (#10750)" (#10787)
This reverts commit 5581eaa50a due to link failure on macOS.
2023-01-04 23:29:18 -05:00
Miodrag Milanović
5581eaa50a
Update BGFX, BX and BIMG (#10750)
* Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
2023-01-04 23:12:10 -05:00
Vas Crabb
b55671d63a bgfx: Re-built shaders for crt-geom update. 2022-07-07 20:04:22 +10:00
cgwg
75466ad87d
bgfx: crt-geom and crt-geom-deluxe improvements: (#8653)
* crt-geom-deluxe: Increased number of taps for halation and increased maximum width.
* crt-geom*: Moved repeated crt-geom/crt-geom-deluxe functions into their own file.
* crt-geom and crt-geom-deluxe: added support for sRGB output gamma ramp and made it the default.
2022-07-07 19:15:55 +10:00
MooglyGuy
0ae650ffbb
-bgfx: Fixed YUV shader to have better brightness balance. [Ryan Holtz] (#9425) 2022-03-17 04:40:38 +11:00
MooglyGuy
1ad39cb5dd
-bgfx: Added default LUT PNG, fixes LUT-effect crash. Fixed external texture loading, restoring HQx filters. [Ryan Holtz] (#9401) 2022-03-12 20:30:02 -05:00
MooglyGuy
cbc2489dfc
-bgfx: Switched fs_blit_palette16 to expand bitmap_ind16 contents to R8. Fixes vertical off-by-one shift in games with an odd pixel count along X. [Ryan Holtz] (#8528) 2021-09-04 09:02:10 -04:00
MooglyGuy
793875bf4d
-bgfx: Fixed UV rounding errors in fs_blit_palette16; Switched back to direct texture upload rather than CPU copy. (#8505) [Ryan Holtz] 2021-08-30 01:49:03 +10:00
MooglyGuy
a472f4663f
-bgfx: Revised fs_blit_palette16 to not use pixel rounding. Fixes issues in carpolo, kncljoe, and others. [Ryan Holtz] (#8488) 2021-08-24 10:33:47 -04:00
MooglyGuy
190f50e0a4
BGFX fixes for various backends (#8469) [Ryan Holtz]
* Fixed palette and UYVY conversion in all backends. Fixes MT07760.
* Fixed a typo in targetmanager.cpp, thanks LN for the heads-up.
2021-08-20 03:07:28 +10:00
Miodrag Milanovic
4c9b0b24dc bgfx shaders recompile 2021-08-13 11:21:46 +02:00
Vas Crabb
a860495f6c bgfx: Fixed crt-geom{,-deluxe} shader compilation and recompiled shaders. 2021-03-20 02:58:53 +11:00
cgwg
931f85ee27
bgfx: crt-geom and crt-geom-deluxe enhancements (#7872)
* Made spot size parameters adjustable also increased samples from 2 to 3 scanlines for crt-geom-deluxe.
* Made horizontal interpolation adjustable.
* bgfx crt-geom-deluxe: Made phosphor decay smoothly to zero at specified cutoff time.
* bgfx crt-geom-deluxe: Added lowpass filter.
2021-03-20 02:38:07 +11:00
Vas Crabb
574b21ffb9 bgfx: Compiled new shaders for Direct3D, ESSL, Metal and SPIR-V. 2021-02-21 15:24:27 +11:00
cgwg
92b2921754
bgfx: crt-geom and crt-geom-deluxe enhancements (#7766)
Added a "brightness boost" feature for the shadow mask that works by making the brightness ratio between bright and dark mask pixels closer to 1 for the brighter parts of the image.

Added clamping to zero so that underscanning produces a black border.

Added a "raster bloom" effect to crt-geom-deluxe that makes the image grow slightly when the average brightness of the screen is high, mimicking a common defect in CRTs.
2021-02-21 14:47:28 +11:00
Vas Crabb
e713adea33 bgfx: Fixed overlapping register in lcd-grid shaders and compiled for Direct3D, SPIR-V, Metal, etc. 2021-01-23 15:25:33 +11:00
cgwg
42a2b0006b
bgfx: Added lcd-grid shader. (#7691)
Note that this is currently only compiled for GLSL.
2021-01-23 15:04:48 +11:00
Ryan Holtz
bdae1de304 -bgfx: Shader recompile after cgwg's changes. [Ryan Holtz] 2020-12-23 22:50:51 +01:00
cgwg
1a9560f064 Modified crt-geom-deluxe to track the power-law fall-off for longer (up to 1024 frames). Ensured that the intensity falls to zero afterward.
Note that this is currently only compiled for GLSL.
2020-12-23 21:56:05 +01:00
MooglyGuy
8dd5e3d200 -bgfx: Fixed Github issue #5961. [Ryan Holtz] 2019-11-24 19:30:08 +01:00
MooglyGuy
4cccc0183c -bgfx: Fixed Github issues #5830 and #5956. [Ryan Holtz] 2019-11-24 15:40:28 +01:00
Julian Sikorski
0c70101b74 Sync bgfx, bx and bimg with upstream; fix the hlsl fs_chroma.sc matrix transposition properly (#5875)
* Sync bgfx with upstream revision 280420d

* Sync bx with upstream revision 267727d

* Sync bimg with upstream revision c1bab10

* Use bgfx helper functions to ensure correct matrix orientation

* Rebuild hlsl chain
2019-11-12 22:08:23 -05:00
MooglyGuy
c24d44ec62 -bgfx: Fixed opengl backend, nw 2019-10-21 16:34:41 +02:00
Olivier Galibert
ff61acb863 Add missing spirv shaders (nw) 2019-10-14 14:36:05 +02:00
MooglyGuy
61b2a8afaf -bgfx: Do texture format conversion via a full-screen GPU pass. [Ryan Holtz] 2019-10-13 20:59:35 +02:00
Julian Sikorski
0837e7451a WIP: sync bgfx, bx and bimg with latest upstream (#5723)
* Sync with bgfx upstream revision b91d0b6

* Sync with bx upstream revision d60912b

* Sync with bimg upstream revision bd81f60

* Add astc-codec decoder

* Rename VertexDecl to VertexLayout

* Rename UniformType enum Int1 to Sampler.

* Add NVN stub

* Fix unused-const-variable error on macOS

* Drop redundant explicit language parameters
buildoptions_cpp are only applied to c++ files and buildoptions_objcpp are only
applied to objective c++ files. As such, hardcoding -x offers no benefit while
preventing overrides (such as one needed by 3rdparty/bgfx/src/renderer_vk.cpp on
macOS) from working.

* Re-introduce -x c++ in places where C code is compiled as C++ to prevent clang from throwing a warning

* Build bgfx as Objective-C++ on macOS
It is needed due to included headers

* Enable Direct3D12 and Vulkan bgfx rendering backends

* Enable building of spirv shaders

* Properly escape /c in cmd call

* Comment out dx12 bgfx renderer

* Honor VERBOSE setting during shaders build

* Only invert hlsl shader XYZ_TO_sRGB matrix for opengl

* Add spirv shaders

* OpenGL ES needs transposed matrix too

* Metal needs transposed matrix as well
2019-10-13 07:50:38 -04:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
Henrik Algestam
40efb8f5aa Transposed transformation matrix to fix bgfx colors (nw) 2019-01-08 23:48:12 +01:00
Westley M. Martinez
b5a54b761c HLSL Color Transforms and 3D LUT (#4043)
* Remove broken scanline uniform from post_pass

* Add 3D LUT to HLSL

* Allow individual LUTs for screen and UI

* WIP: Port 3D LUT to BGFX

* Finish porting LUT to BGFX

* Add individual phosphor color conversion for HLSL
	new file:   hlsl/chroma.fx
		Shader for converting xyY3 to sRGB
	modified:   hlsl/phosphor.fx
		Minor changes to emphasize idea that phosphors are color
agnostic
	modified:   hlsl/post.fx
		Conversion from signal RGB to xyY3
	modified:   src/osd/modules/render/d3d/d3dhlsl.cpp
	modified:   src/osd/modules/render/d3d/d3dhlsl.h
	modified:   src/osd/windows/winmain.cpp
	modified:   src/osd/windows/winmain.h

* Add phosphor examples and update presets

* Port phosphor color shaders to BGFX

* Fix missing newlines at EOF
2018-10-07 11:42:30 -04:00
W. M. Martinez
b4888aabc0 Port scanline modification to BGFX 2018-09-14 19:00:52 -07:00
Miodrag Milanovic
3917627494 Updated GENie, BGFX, BX, added BIMG since it is separated now, updated all shader binaries and MAME part of code to support new interfaces [Miodrag Milanovic] 2017-12-01 13:22:27 +01:00
MooglyGuy
0a7da0fb67 -bgfx: Fixed xBR-lv2-multipass shader. [Ryan Holtz] 2017-06-11 19:55:47 +02:00
MooglyGuy
8496545170 -bgfx: Fixed the following xBR shaders: xBR-lv2-fast, xBR-lv2-noblend, xBR-lv2, xBR-lv3-noblend, and xBR-lv3. [Ryan Holtz] 2017-06-10 12:52:17 +02:00
MooglyGuy
90d6fe79ce Fixed HQx shaders with BGFX OpenGL backend. Fixes for more shaders seem to be a bit more involved. Will have proper commit message later. (nw) 2017-05-18 00:59:37 +02:00
Miodrag Milanovic
e095ef959b update shaders (nw) 2017-03-29 17:15:48 +02:00
Miodrag Milanovic
9b999667af Rebuild shaders, only metal is affected (nw) 2017-02-05 14:23:33 +01:00
Miodrag Milanovic
0f5eda9c28 Fix for glsl (nw) 2016-10-29 17:38:54 +02:00
Branimir Karadžić
a3b4058bf7 Updated BGFX and BX and recompiled shaders (nw) 2016-10-29 09:11:50 +02:00
Jezze
d9ae40b9fe Reduced defocus effect to one pass (HLSL/BGFX)
- removed second defocus pass
- limited defocus stength to a maximum of 2.0
2016-10-22 22:56:16 +02:00
Jezze
68036515ba Fixed aspect ratio of rounded corners (nw) 2016-09-29 15:19:44 +02:00
Jezze
ecf1e166fc Fixed several small issues in HLSL/BGFX
* fixed target texture dimension when -intoverscan is used (this fixes the appereance of scanline and shadow mask)
* added target_scale and screen_count uniforms
* rounded corners now remain aligned with screen bounds when -intoverscan is used (single screen only)
2016-09-28 15:30:43 +02:00
Miodrag Milanovic
d193abb0ad Update BGFX and BX packages and update MAME code to support new API (nw)
Generated missing shaders (nw)
2016-09-03 13:30:42 +02:00
Jezze
7dc76d6501 - already fixed scanline issue also applied for swapped orientation (nw) 2016-08-13 20:30:56 +02:00
Jezze
0e799e0b98 - updated shader binaries which have changed after the last BGFX update (nw) 2016-08-13 20:30:55 +02:00
Jeremy Green
3697bd8cdc Added crt-geom and crt-geom-deluxe shaders for bgfx.
This includes several aperture grille / shadow mask patterns. Note that these are all designed to be used on a display with RGB subpixel order, and may thus suffer if rotated or used with a BGR display.
2016-07-03 22:43:16 +02:00