MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

crazy46guy
MAME Fan
Reged: 06/28/13
Posts: 15
Send PM


xBRZ Shaders for MAME and HBMAME
#355102 - 06/01/16 09:15 AM Attachment: xBRZ Shaders for Mame.zip 21 KB (116 downloads)


Here are 2x, 3x, 4x, 5x and 6x xBRZ shaders for MAME and HBMAME.

These shaders are from the DeSmuME team. I did not write them. I made some small changes so the shaders can work in MAME or HBMAME.

Place the shader directory from the attachment next to your MAME or HBMAME executable. Update your mame.ini or hbmame.ini with settings from the attached mame.ini.

The shaders run slower than Zenju's C++ code, but work well.



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 2261
Send PM


Re: xBRZ Shaders for MAME and HBMAME new [Re: crazy46guy]
#355105 - 06/01/16 12:50 PM


It's unfortunate that you wasted your time with this. MAME actually has had a proper data-driven shader system for the past couple of months now, using the BGFX rendering backend. Had you gone that route, you could have submitted the shaders directly to the MAME team for inclusion in mainline MAME. As it is now, though, it's a hack and can't be included.



crazy46guy
MAME Fan
Reged: 06/28/13
Posts: 15
Send PM


Re: xBRZ Shaders for MAME and HBMAME new [Re: MooglyGuy]
#355170 - 06/02/16 02:09 AM


How do write BGFX shaders?



Jezze
Reged: 03/14/05
Posts: 72
Send PM


Re: xBRZ Shaders for MAME and HBMAME new [Re: crazy46guy]
#355286 - 06/04/16 11:15 AM


The BGFX shader syntax is pretty much identical to GLSL. As example you can take a look at the already implemented HQx pixel filter.

e.g. /mame/src/osd/modules/render/bgfx/shaders/chains/hqx

You compile the shaders with the regular MAME build tools and the command line 'make shaders'. The shader binaries are built into /mame/bgfx/shaders/[backend]/[shader].

In addition you need to define some meta information like uniforms, sliders, targets and passes.

e.g. /mame/bgfx/effects/hqx
The format of the effects/*.json files is documented in /mame/bgfx/effects/default/blit.json.

e.g. /mame/bgfx/chains/hqx
The format of the chains/*.json files is documented in /mame/bgfx/chains/hlsl.json.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 261 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 5735