MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

R.Coltrane
MAME user since 0.11
Reged: 08/07/05
Posts: 495
Send PM


BGFX - CRT-GEOM-DELUXE feature request
#372954 - 01/10/18 10:16 PM


I would like to know if it is possible to include a new feature in BGFX (CRT-GEOM-DELUXE shader) to adjust the darkness of the scanlines similar to what we already have in HLSL.

I decided to open this request because I feel that our current CRT-GEOM-DELUXE scanlines are too dark (I know they are supposed to look that way) and I would like to soften the image a little bit by reducing the amount of black in scanlines, or by making the scanlines less dark.

When I play at night, my eyes get hurt with these 100% black scanlines! And I've read somewhere that in a real CRT monitor, the scanlines are less noticeable because of the luminosity of the CRT tube, which makes the scanlines less dark and you even have the illusion that the scanlines are thinner because of that, so the final image is smoother than what we achieve using this shader.

But since I love this particular shader, I want to keep using it, I just would like to have this extra feature to adjust.



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


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: R.Coltrane]
#372957 - 01/11/18 12:27 AM


Looks like the shader was written by cgwg, Themaister, and DOLLS. No, disrespect, but I don’t know who any of those are. They would be the ones who should consider the change, IMO.

Why do you prefer CRT Geometry DX over HLSL?

Btw, the idea that luminosity makes things look bigger isn’t true. CRTs with poor voltage regulation allow the electron beam to expand, so brighter colors have thicker scanlines, but that’s not a ubiquitous property.

Edited by anikom15 (01/11/18 12:30 AM)



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


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: R.Coltrane]
#372959 - 01/11/18 01:00 AM


> I would like to know if it is possible to include a new feature in BGFX
> (CRT-GEOM-DELUXE shader) to adjust the darkness of the scanlines similar to what we
> already have in HLSL.
>
> I decided to open this request because I feel that our current CRT-GEOM-DELUXE
> scanlines are too dark (I know they are supposed to look that way) and I would like
> to soften the image a little bit by reducing the amount of black in scanlines, or by
> making the scanlines less dark.
>
> When I play at night, my eyes get hurt with these 100% black scanlines! And I've read
> somewhere that in a real CRT monitor, the scanlines are less noticeable because of
> the luminosity of the CRT tube, which makes the scanlines less dark and you even have
> the illusion that the scanlines are thinner because of that, so the final image is
> smoother than what we achieve using this shader.
>
> But since I love this particular shader, I want to keep using it, I just would like
> to have this extra feature to adjust.

I haven't had the tools to compile mame set up in probably a year. But assuming I can get the tools updated to the point where I can compile bgfx shaders again, I'll post a hacked up version for you here.

Who knows, if I offend cgwg enough with the poor quality of the changes, he may even pop up to make some kind of official update. Probably not though.



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


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: anikom15]
#372960 - 01/11/18 01:08 AM


> Looks like the shader was written by cgwg, Themaister, and DOLLS. No, disrespect, but
> I don’t know who any of those are. They would be the ones who should consider the
> change, IMO.
>
> Why do you prefer CRT Geometry DX over HLSL?
>
> Btw, the idea that luminosity makes things look bigger isn’t true. CRTs with poor
> voltage regulation allow the electron beam to expand, so brighter colors have thicker
> scanlines, but that’s not a ubiquitous property.

cgwg wrote the first decent crt shader MAME ever had for the older glsl system. Also his shader is very common in other emulators. Retroarch, Dosbox, etc all have multiple versions of crt-geom.

It's not the fastest shader around anymore, but it's still a million times faster than hlsl. And it's default settings always look good, if a little dimmer than some people like.

You can read a long thread about this stuff over here:

http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=49774&page=all



R.Coltrane
MAME user since 0.11
Reged: 08/07/05
Posts: 495
Send PM


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: anikom15]
#372961 - 01/11/18 01:09 AM


> Why do you prefer CRT Geometry DX over HLSL?

Because with my LCD TV, this shader is the one which provides the greatest (nearest) result when compared to a real CRT monitor. And it is a LOT faster than HLSL. Also, HLSL requires a more powerful machine/video card (I cannot run HLSL within my Dell notebook for example, where BGFX runs like a charm).

HLSL is great too, but it looks fake in my TV. Maybe I'm using wrong settings on it though.

And I believe Jesse is the one who did the latest changes to these CRT shaders. I may be mistaken though...



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


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: R.Coltrane]
#372965 - 01/11/18 03:17 AM


> > Why do you prefer CRT Geometry DX over HLSL?
>
> Because with my LCD TV, this shader is the one which provides the greatest (nearest)
> result when compared to a real CRT monitor. And it is a LOT faster than HLSL. Also,
> HLSL requires a more powerful machine/video card (I cannot run HLSL within my Dell
> notebook for example, where BGFX runs like a charm).
>
> HLSL is great too, but it looks fake in my TV. Maybe I'm using wrong settings on it
> though.
>
> And I believe Jesse is the one who did the latest changes to these CRT shaders. I may
> be mistaken though...

Yep, HLSL is slow. It's something I've had some difficulty with, but it's also probably the most flexible CRT shader around today. This is important because different people have a different expectation of an accurate CRT. Some want it to look like a high-quality Trinitron, others a wholly uncalibrated Magnavox (no disrespect, I'm just referencing one of my old favorite TVs). Also, I want HLSL to be flexible enough to simulate other kinds of displays like LCDs and projectors, not just CRTs. I don't think any of the current CRT shaders, at least from what I've seen, are accurate in any sense.

I'm currently working on improvements for HLSL, which will include updated presets. ImJezze made some new presets a while back and they are much better than the old presets. If I'm able to complete this first pass of things, I'm hoping to get some simplification of the parameters approved, and I hope that will make HLSL more popular overall. The one thing I'm not addressing is performance because I'm not an expert in that area.

I'm also working on a CRT emulator, not just a simulator, outside of MAME, that uses inputs that have physical quantities, but it is not real-time. I do think it could be possible to make it real-time with optimizations though, and that makes me hopeful. But it is far from complete, and it wouldn't work with MAME's current output methods either.



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


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: SoltanGris42]
#372966 - 01/11/18 04:16 AM Attachment: crt-geom-deluxe-HACK.zip 84 KB (16 downloads)


> > I would like to know if it is possible to include a new feature in BGFX
> > (CRT-GEOM-DELUXE shader) to adjust the darkness of the scanlines similar to what we
> > already have in HLSL.
> >
> > I decided to open this request because I feel that our current CRT-GEOM-DELUXE
> > scanlines are too dark (I know they are supposed to look that way) and I would like
> > to soften the image a little bit by reducing the amount of black in scanlines, or
> by
> > making the scanlines less dark.
> >
> > When I play at night, my eyes get hurt with these 100% black scanlines! And I've
> read
> > somewhere that in a real CRT monitor, the scanlines are less noticeable because of
> > the luminosity of the CRT tube, which makes the scanlines less dark and you even
> have
> > the illusion that the scanlines are thinner because of that, so the final image is
> > smoother than what we achieve using this shader.
> >
> > But since I love this particular shader, I want to keep using it, I just would like
> > to have this extra feature to adjust.
>
> I haven't had the tools to compile mame set up in probably a year. But assuming I can
> get the tools updated to the point where I can compile bgfx shaders again, I'll post
> a hacked up version for you here.
>
> Who knows, if I offend cgwg enough with the poor quality of the changes, he may even
> pop up to make some kind of official update. Probably not though.

I'm attaching a zip file with a "bgfx" folder to merge with the one in MAME 0.193. I can't guarantee other versions work. You can also get the zip file on my google drive here: Zip File on Google Drive

crt-geom-deluxe has a scanline profile controlled by two paramters.

I hooked them up to MAME bgfx sliders and changed the default for the first parameter to lighten the scanline slightly. The new shader is called crt-geom-deluxe-HACK so that nobody thinks it's official or from the real author.

If you want to brighten the scanlines more you should:


  1. Use the sliders in the TAB menu to find the values for "Scanline Width Parameters X" and "Scanline Width Parameters Y" that you prefer.

    EDIT: It's not the TAB menu you want. It's slider menu. Default shortcut should be the "~" or "`" key.

  2. Edit the "MAME\bgfx\chains\crt-geom-deluxe-HACK.json". Near the top of the file you'll see

    Code:


    { "type": "vec2",
    "name": "scanWidth",
    "text": "Scanline Width Parameters ",
    "default": [ 0.35, 0.1 ],
    "max" : [ 0.5, 0.5 ],
    "min" : [ 0.0, 0.0 ],
    "step" : 0.01,
    "format": "%1.2f",
    "screen": "raster" },


    You want to change the line that starts with "default" to the values you noted in step 1.


Please note that the first parameter is the most important. The default in crt-geom-deluxe is 0.30. I'm using 0.35. But you can experiment with both parameters if you want to.

Let me know if you have any problems

Edited by SoltanGris42 (01/12/18 11:19 PM)



R.Coltrane
MAME user since 0.11
Reged: 08/07/05
Posts: 495
Send PM


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: SoltanGris42]
#372994 - 01/12/18 04:55 PM


> > > I would like to know if it is possible to include a new feature in BGFX
> > > (CRT-GEOM-DELUXE shader) to adjust the darkness of the scanlines similar to what
> we
> > > already have in HLSL.
> > >
> > > I decided to open this request because I feel that our current CRT-GEOM-DELUXE
> > > scanlines are too dark (I know they are supposed to look that way) and I would
> like
> > > to soften the image a little bit by reducing the amount of black in scanlines, or
> > by
> > > making the scanlines less dark.
> > >
> > > When I play at night, my eyes get hurt with these 100% black scanlines! And I've
> > read
> > > somewhere that in a real CRT monitor, the scanlines are less noticeable because
> of
> > > the luminosity of the CRT tube, which makes the scanlines less dark and you even
> > have
> > > the illusion that the scanlines are thinner because of that, so the final image
> is
> > > smoother than what we achieve using this shader.
> > >
> > > But since I love this particular shader, I want to keep using it, I just would
> like
> > > to have this extra feature to adjust.
> >
> > I haven't had the tools to compile mame set up in probably a year. But assuming I
> can
> > get the tools updated to the point where I can compile bgfx shaders again, I'll
> post
> > a hacked up version for you here.
> >
> > Who knows, if I offend cgwg enough with the poor quality of the changes, he may
> even
> > pop up to make some kind of official update. Probably not though.
>
> I'm attaching a zip file with a "bgfx" folder to merge with the one in MAME 0.193. I
> can't guarantee other versions work. You can also get the zip file on my google drive
> here: Zip File on Google Drive
>
> crt-geom-deluxe has a scanline profile controlled by two paramters.
>
> I hooked them up to MAME bgfx sliders and changed the default for the first parameter
> to lighten the scanline slightly. The new shader is called crt-geom-deluxe-HACK so
> that nobody thinks it's official or from the real author.
>
> If you want to brighten the scanlines more you should:
>
>
> Use the sliders in the TAB menu to find the values for "Scanline Width Parameters X"
> and "Scanline Width Parameters Y" that you prefer.
> Edit the "MAME\bgfx\chains\crt-geom-deluxe-HACK.json". Near the top of the file
> you'll see
>
> { "type": "vec2",
> "name": "scanWidth",
> "text": "Scanline Width Parameters ",
> "default": [ 0.35, 0.1 ],
> "max" : [ 0.5, 0.5 ],
> "min" : [ 0.0, 0.0 ],
> "step" : 0.01,
> "format": "%1.2f",
> "screen": "raster" },
>
> You want to change the line that starts with "default" to the values you noted in
> step 1.
>
>
> Please note that the first parameter is the most important. The default in
> crt-geom-deluxe is 0.30. I'm using 0.35. But you can experiment with both parameters
> if you want to.
>
> Let me know if you have any problems

Very cool!! I'll give it a try and post the results here later. Thanks a lot man!!



R.Coltrane
MAME user since 0.11
Reged: 08/07/05
Posts: 495
Send PM


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: R.Coltrane]
#373066 - 01/13/18 06:07 PM


THANKS SOltanGris42, it worked like a charm!!!! Now the scanlines are the way I wanted them since the beginning!

Just a doubt: the preset value of 0.35 is the same scanline strenght from the original shader, or the default would be 0.30?

The greatest value for my TV is 0.38. THANKS!!



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


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: R.Coltrane]
#373077 - 01/14/18 04:09 AM


> THANKS SOltanGris42, it worked like a charm!!!! Now the scanlines are the way I
> wanted them since the beginning!
>
> Just a doubt: the preset value of 0.35 is the same scanline strenght from the
> original shader, or the default would be 0.30?
>
> The greatest value for my TV is 0.38. THANKS!!

The original value is 0.30. I changed it to 0.35 when I edited the file so that you would have something closer to what you wanted even if you couldn't/wouldn't edit the file yourself. I guess you can go up to a little over 0.4 before it starts to look bad. And if you change the second parameter too then you might need a different value for the first parameter.

I'm glad it did what you wanted



R.Coltrane
MAME user since 0.11
Reged: 08/07/05
Posts: 495
Send PM


Re: BGFX - CRT-GEOM-DELUXE feature request new [Re: SoltanGris42]
#373116 - 01/15/18 03:05 PM


Any chance of having this altered shader in MAME as an official (non-hacked) version?

With this new parameter, the shader is way better and more complete as well, and it does not break the original settings in any way.


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

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