Posts: 4
Joined: Tue Oct 30, 2018 4:25 pm

Translating from old HLSL to BGFX HLSL

Wed Oct 31, 2018 1:37 pm


I recently started updating my MAME setup and much of the rest of my cab, and learned about bgfx. I'm really liking it, if anything because when I load CPWizard while playing a game, the display switches almost immediately between the game and CPWizard, whereas it is quite slow with d3d.

However, I had an HLSL setup that I really liked and I'm wondering if is possible to transfer those old HLSL parameters to BGFX enabled HLSL.
Is there 1:1 paramter correspondence between the two systems so that I could just copy them over, or would I have "feel" my way through it experimenting with the new setup?

Another reason why I'm interested in doing this is that MAME's default vector HLSL preset is fantastic but BGFX doesn't have one.


Posts: 4
Joined: Tue Oct 30, 2018 4:25 pm

Re: Translating from old HLSL to BGFX HLSL

Thu Nov 01, 2018 1:41 pm

I played with this last night and was able to find all the parameters from the old HLSL implementation in the new BGFX system. However, the resulting image was messed up. The problem seems to be with the radial convergence and slot mask pixel count parameters.

The radial convergence was way off using the the numbers that I had in old HSLS. The slot mask pixel count in my old HLSL settings was negative (I got it from a forum) and seemed to work fine but it's not even inside the allowable range in BGFX HLSL, which doesn't include negative numbers.

Is there some decoder ring that will help me find equivalent values for these parameters between old HLSL and BGFX HLSL?

Note: when I say "old HLSL", I mean regular HLSL as of version 0.202, not an older HLSL implementation.

Return to “MAME Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests