Previous Thread
Next Thread
Print Thread
Page 3 of 5 1 2 3 4 5
Joined: Mar 2001
Posts: 17,005
Likes: 94
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 17,005
Likes: 94
Thanks Soltan, that sounds promising smile

Joined: Jul 2015
Posts: 104
Senior Member
Offline
Senior Member
Joined: Jul 2015
Posts: 104
Originally Posted By SoltanGris42
[quote=cgwg]
So for crt-geom to work we need:

  • all the "vec2(0.5)" type things updated to vec2(0.5, 0.5) or I guess vec2_splat(0.5)
  • the matrix multiply for the transformtation to use mul(x,y)
  • all access of varying parameters to be in main() ONLY


I'm not trying to force you to make all these changes, I could probably do it if I have a few minutes later. But I wanted to list the required changes here in case you wanted to make the modifications yourself, but didn't have access to a Windows PC with MAME build tools.

Good work though. HLSL is too slow to run on integrated graphics and CRT-geom isn't. So it definitely is useful to have available.

Thank you SoltanGris42 for the info and indeed, it would be nice to have crt-geom, it became a very popular shader among MAME users.


I live... I die... I live again.
Joined: May 2011
Posts: 41
S
Member
OP Offline
Member
S
Joined: May 2011
Posts: 41
Ok, I took a shot at it.

I didn't try to make smart decisions about the best way to do anything. Just mindlessly fixed whatever the compiler was complaining about.

And even though the opengl version looked fine, the dx versions produced incorrect output with the matrix/vector multiplication and so I switched it to separate multiplications.

I also added in a magenta/green striped aperture mask just because I thought it was a standard feature in most crt-geom versions floating around the internet. And I added a slider to turn off the effect. I hope cgwg doesn't mind...

The file I'm uploading has a bgfx folder to merge with the one in the MAME folder that includes the chain/effect/binary shaders and a separate folder with the modified source.

Here you go: http://filebin.ca/2kEIhx4PExYW/crt-geom_bgfx_modified.zip

Last edited by SoltanGris42; 06/10/16 11:08 PM.
Joined: Apr 2011
Posts: 292
Senior Member
Offline
Senior Member
Joined: Apr 2011
Posts: 292
Thank you SoltanGris42 smile

Joined: May 2011
Posts: 41
S
Member
OP Offline
Member
S
Joined: May 2011
Posts: 41
Originally Posted By B2K24
Thank you SoltanGris42 smile


Thank cgwg! I looked at crt-geom when Moogly first added the bgfx system and decided it would be a PITA to port to bgfx because of the way it used "#define"s for everything.

So it's pretty cool that cgwg just popped up with "Here's a bgfx shader" smile

Because we wouldn't have had it otherwise unless MooglyGuy went on another shader porting binge.

Joined: Apr 2006
Posts: 770
Likes: 2
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 770
Likes: 2
I'm gonna wait until it is added to the https://github.com/mamedev/mame I have no idea on what I'm doing. Not that smart. No rushing at all.

Nevermind. Keep my mouth shut about removed the HLSL and OpenGL later on. smile


Windows 10 Home 64-bit / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 16 GB
Joined: May 2011
Posts: 41
S
Member
OP Offline
Member
S
Joined: May 2011
Posts: 41
Originally Posted By Dullaron
I'm gonna wait until it is added to the https://github.com/mamedev/mame I have no idea on what I'm doing. Not that smart. No rushing at all.

Nevermind. Keep my mouth shut about removed the HLSL and OpenGL later on. smile


Originally Posted By Dullaron
I'm gonna wait until it is added to the https://github.com/mamedev/mame I have no idea on what I'm doing. Not that smart. No rushing at all. Soon I think they gonna pull out the opengl and the hlsl part from the source. Since the bgfx is getting more shaders added.


Well it's actually super simple.

You just need to get the "effect", "chain", and "shader" folder contents in the right place. It's easier than switching GLSL shaders or modifying the json files to change the default shaders. And I know that you've done that stuff.

So you should be able to do it.

Because who knows when or if it will end up in MAME git. I'm not sure what license crt-geom is, or whether JD wants to add every random shader to MAME or not. I think crt-geom would be great to have, personally, because it's got to be the most commonly used of the GLSL shaders and people trying to run HLSL on a potato will have more luck with crt-geom.

Joined: Apr 2011
Posts: 292
Senior Member
Offline
Senior Member
Joined: Apr 2011
Posts: 292
Understood SoltanGris42 smile

@Dullaron just extract the archive as SG stated (basically the root of your mame folder)

Then simply run with

Code:
-video bgfx -bgfx_screen_chains crt-geom

Joined: Apr 2006
Posts: 770
Likes: 2
D
Senior Member
Offline
Senior Member
D
Joined: Apr 2006
Posts: 770
Likes: 2
Oh ok. I thought I have to compile it first. Working here. Thanks guys.


Windows 10 Home 64-bit / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 16 GB
Joined: Jul 2015
Posts: 104
Senior Member
Offline
Senior Member
Joined: Jul 2015
Posts: 104
Originally Posted By SoltanGris42

Because who knows when or if it will end up in MAME git. I'm not sure what license crt-geom is, or whether JD wants to add every random shader to MAME or not. I think crt-geom would be great to have, personally, because it's got to be the most commonly used of the GLSL shaders and people trying to run HLSL on a potato will have more luck with crt-geom.


There should be no problem with the license:

Quote:
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.


and cgwg always gave us kindly the permission to use it.
i agree with the low-resource statements of crt-geom. it is really a good alternative for low-end setups.


I live... I die... I live again.
Page 3 of 5 1 2 3 4 5

Link Copied to Clipboard
Who's Online Now
5 members (ssj, Cpt. Pugwash, exidyboy, 2 invisible), 52 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,189
Posts120,324
Members5,044
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com