Commit graph

100 commits

Author SHA1 Message Date
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
Vas Crabb
0c49c74ada srcclean: Added JSON cleaning support, and some cleanup.
Made pbobble parent of bublbust, as it seems to be more widespread and
more complete.  Also fixed some ROM labels for bublbust.

Made tbyahhoo parent of mtwinbee as the latter has substantial content
removed rather than being localised, making it less complete.

Applied srcclean to JSON files in bgfx subtree.
2021-08-20 05:52:27 +10: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
Aaron Giles
2ccc0a290a bgfx: Disable lowpass filter by default by setting it to its maximum value, since it does not account for actual monitor type. We can revisit this decision in the future if better monitor information is provided from the driver. 2021-03-23 09:31:32 -07: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
Ryan Holtz
3fa3969c9b -bgfx: Corrected hlsl.json to apply the intended screen tint. [Ryan Holtz] 2020-06-20 15:42:50 +02:00
arbee
b575f0d00a This wasn't supposed to go in (nw) 2020-02-18 22:54:13 -05:00
arbee
e95e2a743d apple2: figured out C800 banking on the Applesurance card, it now works 100% (nw) 2020-02-18 22:51:46 -05: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
Vas Crabb
9cbc957076 (nw) misc cleanup:
* tabify a JSON file (not currently handled by srcclean)
* get rid of stray printf
* µ'nSP in header comments - we do UTF-8 source
* spg2xx.cpp: make room for LOG_GENERAL - it's defined as (1U << 0) if you don't give it a different value
* spg2xx.h: inline on member function declarations generally doesn't do anything useful - it's implicit when the function body is inlined at declaration, and in other cases you usually want to put the inline qualifier on the definition, not the declaration
* rainbow.cpp: revert mouse changes - there's no reason a Mouse Systems driver couldn't be loaded, and the Logitech mouse is Microsoft-compatible
* video21.cpp: use deal/stand for blackjack control buttons now that we're not using deal for vblank
2018-11-04 17:57:08 +11: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
Martin Lindhe
b3c2645085 fix some typos (#2772) 2017-11-03 14:58:54 +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
Luke Jones
631323e9c2 Updates FSF address in a few files. (#2044)
* Update hq2x.json

Correct FSF address

* Update hq3x.json

Correct FSF address

* Update hq4x.json

Correct FSF address
2017-02-06 18:50:49 -05: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
therealmogminer@gmail.com
3e0d522bce Fix GH#1364 [tabbycat12] 2016-09-10 10:53:48 +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
ImJezze
2f06a08ec4 Small shader corrections (nw) 2016-06-20 00:03:44 +02:00