MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

Mr Ric
MAME Fan
Reged: 09/25/05
Posts: 251
Send PM


Questions about crt-geom and crt-geom-deluxe bgfx shaders
#357141 - 07/30/16 06:20 PM


Is the aperture mask built-in to the shaders or do we pick the mask like this...

bgfx_path bgfx
bgfx_screen_chains crt-geom-deluxe,crt-geom-deluxe,crt-geom-deluxe
bgfx_shadow_mask shadow_mask.png

or...

bgfx_path bgfx
bgfx_screen_chains crt-geom-deluxe,crt-geom-deluxe,crt-geom-deluxe
bgfx_shadow_mask scanlines.png


Does the aperture mask auto-rotate based on the games orientation, horizontal or vertical ?



SoltanGris42
MAME Fan
Reged: 11/16/13
Posts: 134
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: Mr Ric]
#357145 - 07/30/16 09:13 PM


> Is the aperture mask built-in to the shaders or do we pick the mask like this...
>
> bgfx_path bgfx
> bgfx_screen_chains crt-geom-deluxe,crt-geom-deluxe,crt-geom-deluxe
> bgfx_shadow_mask shadow_mask.png
>
> or...
>
> bgfx_path bgfx
> bgfx_screen_chains crt-geom-deluxe,crt-geom-deluxe,crt-geom-deluxe
> bgfx_shadow_mask scanlines.png
>
>
> Does the aperture mask auto-rotate based on the games orientation, horizontal or
> vertical ?

crt-geom doesn't get its shadow mask texture from the "-bgfx_shadow_mask" commandline option (afaik). So once you know which aperture mask you like the best from experimenting with the sliders you'll have to edit the "crt-geom.json" or "crt-geom-deluxe.json" in mame/bgfx/chains to point to the texture you want to use. This is generally true if you want to change (any of) the defaults in any of the bgfx shaders btw since they can't save options to a file.

Look for this line near the bottom of the file to change:


Code:

{ "sampler": "mask_texture", "texture": "bgfx/chains/crt-geom/aperture_1_2_bgr.png", "selection": "Shadow mask" }


Also I believe that for vertical games, crt-geom just renders the whole thing like normal and then its output is turned on its side. I think this is actually what we want it to do... For aperture/shadow mask patterns that depend on the subpixel arrangement of your display, this will look weird. For patterns that don't, it will look good. You might need to keep a second copy of the crt-geom.json around for vertical games if you need different options for them. You can just copy/paste "mame/bgfx/chains/crt-geom.json" and give the new version a different name. Then you can edit it as you like.

This kind of thing is necessary until (if?) there is a a way to read/save shader parameters from/to a file.



Mr Ric
MAME Fan
Reged: 09/25/05
Posts: 251
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: SoltanGris42]
#357188 - 07/31/16 04:29 PM


> crt-geom doesn't get its shadow mask texture from the "-bgfx_shadow_mask" commandline
> option (afaik). So once you know which aperture mask you like the best from
> experimenting with the sliders you'll have to edit the "crt-geom.json" or
> "crt-geom-deluxe.json" in mame/bgfx/chains to point to the texture you want to use.
> This is generally true if you want to change (any of) the defaults in any of the bgfx
> shaders btw since they can't save options to a file.
>
> Look for this line near the bottom of the file to change:
>
> { "sampler": "mask_texture", "texture": "bgfx/chains/crt-geom/aperture_1_2_bgr.png",
> "selection": "Shadow mask" }
>
> Also I believe that for vertical games, crt-geom just renders the whole thing like
> normal and then its output is turned on its side. I think this is actually what we
> want it to do... For aperture/shadow mask patterns that depend on the subpixel
> arrangement of your display, this will look weird. For patterns that don't, it will
> look good. You might need to keep a second copy of the crt-geom.json around for
> vertical games if you need different options for them. You can just copy/paste
> "mame/bgfx/chains/crt-geom.json" and give the new version a different name. Then you
> can edit it as you like.
>
> This kind of thing is necessary until (if?) there is a a way to read/save shader
> parameters from/to a file.

Thanks for pointing out that line. In the sliders, I see where you can change to a different effect...such as super-eagle or hlsl, but I don't see where you can change the aperture mask. Where is that slider?

Creating a copy or more of the crt-geom-deluxe.json in the Chains folder with different names is enough? I don't have to create copies of the corresponding files in the other folders such as Effects and Shaders?



SoltanGris42
MAME Fan
Reged: 11/16/13
Posts: 134
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: Mr Ric]
#357199 - 08/01/16 03:04 AM


> > crt-geom doesn't get its shadow mask texture from the "-bgfx_shadow_mask"
> commandline
> > option (afaik). So once you know which aperture mask you like the best from
> > experimenting with the sliders you'll have to edit the "crt-geom.json" or
> > "crt-geom-deluxe.json" in mame/bgfx/chains to point to the texture you want to use.
> > This is generally true if you want to change (any of) the defaults in any of the
> bgfx
> > shaders btw since they can't save options to a file.
> >
> > Look for this line near the bottom of the file to change:
> >
> > { "sampler": "mask_texture", "texture":
> "bgfx/chains/crt-geom/aperture_1_2_bgr.png",
> > "selection": "Shadow mask" }
> >
> > Also I believe that for vertical games, crt-geom just renders the whole thing like
> > normal and then its output is turned on its side. I think this is actually what we
> > want it to do... For aperture/shadow mask patterns that depend on the subpixel
> > arrangement of your display, this will look weird. For patterns that don't, it will
> > look good. You might need to keep a second copy of the crt-geom.json around for
> > vertical games if you need different options for them. You can just copy/paste
> > "mame/bgfx/chains/crt-geom.json" and give the new version a different name. Then
> you
> > can edit it as you like.
> >
> > This kind of thing is necessary until (if?) there is a a way to read/save shader
> > parameters from/to a file.
>
> Thanks for pointing out that line. In the sliders, I see where you can change to a
> different effect...such as super-eagle or hlsl, but I don't see where you can change
> the aperture mask. Where is that slider?
>
> Creating a copy or more of the crt-geom-deluxe.json in the Chains folder with
> different names is enough? I don't have to create copies of the corresponding files
> in the other folders such as Effects and Shaders?

When you have crt-geom selected and running, then the shader parameters for crt-geom will show up in the sliders menu. Then you can change parameters while the game/shader is running. Other shaders work the same way although most don't have parameters to edit so they don't have slider entries either.

So you should be able to run MAME with the shader. Scroll through the different aperture mask textures using the slider menu. And then once you know which one you like, then you can edit the chain file (or better yet, a copy) like I said.

And, yes, all you have to do is copy/paste the single file in the chain folder. Because inside of the json file it specifies the name of the effects, which in turn point to the compiled shaders. The file in the chain folder can have any name you want and you don't meed to modify/create anything in the effect or shader subfolders.



Elispalta
MAME Fan
Reged: 02/03/17
Posts: 2
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: SoltanGris42]
#363173 - 02/03/17 10:22 PM


Is there any way to use crt-geom-deluxe shader by default when loading games in Mame?

Maybe this is possible making two copies as said previously, for horizontal and vertical games.

I'm currently hitting Tab key, and selecting Slider options, and then the crt-geom-deluxe shader every time a game is loaded. Wonder if this process could be automated in any way.



CiroConsentino
Frontend freak!
Reged: 09/21/03
Posts: 6211
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: Elispalta]
#363179 - 02/03/17 11:50 PM


Yes you can.
Just edit bgfx_screen_chains entry in mame.ini with the shader you want to use.

Code:

bgfx_screen_chains        crt-geom-deluxe



Make sure to select bgfx as your video renderer in mame.ini as well

Code:

video                     bgfx




Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
e-mail: ciroconsentino@gmail.com



Elispalta
MAME Fan
Reged: 02/03/17
Posts: 2
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: CiroConsentino]
#363181 - 02/04/17 12:31 AM


That did it. Worked like a charm. Thank you Ciro!



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: SoltanGris42]
#363480 - 02/13/17 05:34 AM


> > > crt-geom doesn't get its shadow mask texture from the "-bgfx_shadow_mask"
> > commandline
> > > option (afaik). So once you know which aperture mask you like the best from
> > > experimenting with the sliders you'll have to edit the "crt-geom.json" or
> > > "crt-geom-deluxe.json" in mame/bgfx/chains to point to the texture you want to
> use.
> > > This is generally true if you want to change (any of) the defaults in any of the
> > bgfx
> > > shaders btw since they can't save options to a file.
> > >
> > > Look for this line near the bottom of the file to change:
> > >
> > > { "sampler": "mask_texture", "texture":
> > "bgfx/chains/crt-geom/aperture_1_2_bgr.png",
> > > "selection": "Shadow mask" }
> > >
> > > Also I believe that for vertical games, crt-geom just renders the whole thing
> like
> > > normal and then its output is turned on its side. I think this is actually what
> we
> > > want it to do... For aperture/shadow mask patterns that depend on the subpixel
> > > arrangement of your display, this will look weird. For patterns that don't, it
> will
> > > look good. You might need to keep a second copy of the crt-geom.json around for
> > > vertical games if you need different options for them. You can just copy/paste
> > > "mame/bgfx/chains/crt-geom.json" and give the new version a different name. Then
> > you
> > > can edit it as you like.
> > >
> > > This kind of thing is necessary until (if?) there is a a way to read/save shader
> > > parameters from/to a file.
> >
> > Thanks for pointing out that line. In the sliders, I see where you can change to a
> > different effect...such as super-eagle or hlsl, but I don't see where you can
> change
> > the aperture mask. Where is that slider?
> >
> > Creating a copy or more of the crt-geom-deluxe.json in the Chains folder with
> > different names is enough? I don't have to create copies of the corresponding files
> > in the other folders such as Effects and Shaders?
>
> When you have crt-geom selected and running, then the shader parameters for crt-geom
> will show up in the sliders menu. Then you can change parameters while the
> game/shader is running. Other shaders work the same way although most don't have
> parameters to edit so they don't have slider entries either.
>
> So you should be able to run MAME with the shader. Scroll through the different
> aperture mask textures using the slider menu. And then once you know which one you
> like, then you can edit the chain file (or better yet, a copy) like I said.
>
> And, yes, all you have to do is copy/paste the single file in the chain folder.
> Because inside of the json file it specifies the name of the effects, which in turn
> point to the compiled shaders. The file in the chain folder can have any name you
> want and you don't meed to modify/create anything in the effect or shader subfolders.

I believe there is an issue with this in that if you make a copy and the shader gets updated in a future release, your shader won't have those changes (and I believe it is possible for the copied shader to break in this regard). The configuration and implementation of the shaders needs to wholly be separated, like the HLSL implementation.



SoltanGris42
MAME Fan
Reged: 11/16/13
Posts: 134
Send PM


Re: Questions about crt-geom and crt-geom-deluxe bgfx shaders new [Re: anikom15]
#363482 - 02/13/17 05:50 AM



> I believe there is an issue with this in that if you make a copy and the shader gets
> updated in a future release, your shader won't have those changes (and I believe it
> is possible for the copied shader to break in this regard). The configuration and
> implementation of the shaders needs to wholly be separated, like the HLSL
> implementation.

The shaders right now have three parts basically: compiled binary shaders, json effect files that correspond to the compiled shaders, and the shader chain file that defines the order of the effects (and other stuff) for a shader chain and also has the configuration options.

If you separated out the default options into another file then things would now be in four places. And all four would need to match for things to work. So that doesn't really solve any problems at all.

But more importantly, people need to deal with things the way they are now and not how they'd like them to be. Which means copying the shader chain file if they want to have multiple sets of options saved.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

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