Author Topic: Showing off GLSL Mame.  (Read 71648 times)

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Showing off GLSL Mame.
« Reply #75 on: June 14, 2015, 04:03:12 PM »
I deleted that - and no change.

So I've started to double-check everything.
And guess what... I was pointing mame.ini to the old shader. :(
Sorry about that.

The switch is working perfectly.
With bloom turned off - laptop stays cool and fan doesn't even start.

But with bloom turned on... the fan is barely audible. If you tweaked/optimised something - it is clearly working. Huge change.



« Last Edit: June 14, 2015, 04:17:48 PM by verion »

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Re: Showing off GLSL Mame.
« Reply #76 on: June 14, 2015, 04:20:58 PM »
Awesome!

I basically trimmed a heck of a lot of extra pixel passes out of it. So it's doing approximately half the work it was doing earlier.
Compared screens after each change also, the difference between old and new is almost non-existent.

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Showing off GLSL Mame.
« Reply #77 on: June 14, 2015, 04:31:24 PM »
I kinda like no-bloom shader - because colours seems to be more vibrant.

But on the other hand I really like bloom effect - everything looks so smooth.
So I enabled bloom and started to play with brightnest/contrast/gamma settings - and settled with gamma = 0.8
The colors are now more saturated and rich. You should try that. I have pretty bright screen - so if it is too dark - use gamma = 0.9

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Re: Showing off GLSL Mame.
« Reply #78 on: June 14, 2015, 09:02:33 PM »
Updated the git again. I've added the bloom on/off to the AM Halation layout  :D
Lottes is still broken though...

Lottes shader now works... Stupid alpha channel!!!  :o

Edit:: Also added YUV and GAMMA adjustments to Halation. All are accessible from the layout.nut.
To turn off YUV or GAMMA, comment out the;
Code: [Select]
#define YUV
#define GAMMA_CONTRAST_BOOST
lines in the .fsh

All files in the Git are updated
https://github.com/Luke-Nukem/attract-extra
« Last Edit: June 14, 2015, 10:17:43 PM by Luke_Nukem »

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Re: Showing off GLSL Mame.
« Reply #79 on: June 15, 2015, 02:21:36 AM »
I came up with this look by using a combo of Lottes + Bloom + Blur shaders. And I'm also working out how to apply part shaders the best way.

For example, you could construct a new look with;
#glsl_shader_mame
A scanline shader.
A bloom shader.
A curvature shader.
An aperture type.

#glsl_shader_screen
A blur shader.
A bloom shader.

So far... Also it depends on the order you apply them in.
Ideally I would eventually work out how the new renderer base (OSD) in Mame is handled, and convert GLSL pipeline to something similar to the HLSL pipeline.
I've filled a few pages in my exercise book with notes already.

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Re: Showing off GLSL Mame.
« Reply #80 on: June 15, 2015, 03:05:09 AM »
And here's an example of using just a very simple scanline shader for the main shader, and a bloom + blur shaders for the screen.

From left to right in the strip is scanline, then scanline + bloom, finally all three.

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Showing off GLSL Mame.
« Reply #81 on: June 15, 2015, 04:31:46 AM »
"all three" = CRT halation?

Because it looks less crisp (more blurry) than halation shader.

----

I like the idea of separate shaders, so you can cherry-pick any of them.
But CRT-halation shader - is exactly what I wanted. And thanks to you - I'm enjoying it here and now.
« Last Edit: June 15, 2015, 06:04:33 AM by verion »

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Showing off GLSL Mame.
« Reply #82 on: June 15, 2015, 06:23:47 AM »
Quote
All files in the Git are updated
https://github.com/Luke-Nukem/attract-extra

I'm happy to report that Lottes in mame is working for me too.
Of course, halation is working too.

----

In AM both shaders are working too.

halation is too blurry for my taste - maybe it should be tweaked to match overall higher resolution of AM layout (or the AM layout should be in lower resolution) to match the look of in-game shader.

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Re: Showing off GLSL Mame.
« Reply #83 on: June 15, 2015, 01:13:02 PM »
"all three" = CRT halation?

Because it looks less crisp (more blurry) than halation shader.

----

I like the idea of separate shaders, so you can cherry-pick any of them.
But CRT-halation shader - is exactly what I wanted. And thanks to you - I'm enjoying it here and now.

Heh, yep. It's got a very specific blur shader just to make it blurry. It's adjustable of course.

Part of the reason for this exercise is to eventually make GLSL Mame the same as HLSL Mame, with the ability to adjust everything via menus and save individual settings per game.
How about the Phosphor shader from... I'm not sure where now..
Only works well on games with large amounts of black space.

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Showing off GLSL Mame.
« Reply #84 on: June 15, 2015, 01:38:25 PM »
Quote
make GLSL Mame the same as HLSL Mame, with the ability to adjust everything via menus and save individual settings per game.
This is great - I didn't know that HLSL is wired that way.

Don't get me wrong - but I don't think that blurred image is a good direction. The greatest thing about your CRT-halation is that it isn't blurry at all. But it's just my point of view and I now that you are just exploring the possibiities.

If you want to wrap your head around some new idea - maybe you can try to implement some good scaling shaders - like Sabr, 4xBR or HQx4 or less CPU intensive Super 2Ă—SaI.
I know a lot of people that prefer to use scaling shaders - and there is nothing better (for me) when recording video to use as video snap, especially as full size background video.
I have 2 working scalers "Saiwa2x" and "Sai2x" - not as good as Sabr or HQx4 - but I can upload it if you want to check them out.
« Last Edit: June 15, 2015, 01:41:29 PM by verion »

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Re: Showing off GLSL Mame.
« Reply #85 on: June 15, 2015, 03:32:13 PM »
Quote
make GLSL Mame the same as HLSL Mame, with the ability to adjust everything via menus and save individual settings per game.
This is great - I didn't know that HLSL is wired that way.

I have 2 working scalers "Saiwa2x" and "Sai2x" - not as good as Sabr or HQx4 - but I can upload it if you want to check them out.

HLSL is basically just a bunch of separated shaders that work together. It's not really possible to make one big giant shader and still have it be efficient.

Started working on porting various filtering shaders, I'll upload a zip of them soon. So far, Scale2x, Bicubic normal, sharp. And working of HQ2X.

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Showing off GLSL Mame.
« Reply #86 on: June 15, 2015, 03:33:49 PM »
HQx2 is great - I don't see that much of a difference between HQx2 and HQx4

Luke_Nukem

  • Sr. Member
  • ****
  • Posts: 135
    • View Profile
    • Blogging about Rust lang
Re: Showing off GLSL Mame.
« Reply #87 on: June 15, 2015, 05:16:12 PM »
Right, here's all the shaders I've gotten together so far.

You can mix and match some of them. But some will also give you strange results when mixed.
Such as using both aperture and curvature for the 'glsl_shader_mame' settings.
Or you could use any part-shader combo (except either curvature or aperture), and then put either curvature or aperture in the glsl_shader_screen** section.

But you can use say, HQ4x and curvature for glsl_shader_mame, and then put bloom and blurx + blury in glsl_shader_screen.

the shaders in "screen-shaders" are only to use with glsl_shader_screen**

NOTE!
The way Mame works at the moment, you need two shaders in the "glsl_shader_mame" section, to be able to use the "glsl_shader_screen" section for anything.
So if you only want one "glsl_shader_mame" and a "glsl_shader_screen", you can add the "pass" shader to the "glsl_shader_mame" section, before or after your chosen shader. The pass only passes the output through.

EDIT:: Updated default settings in Halation Simple.
« Last Edit: June 15, 2015, 05:53:11 PM by Luke_Nukem »

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Showing off GLSL Mame.
« Reply #88 on: June 15, 2015, 08:28:03 PM »
Nice.. I like that better because I have an idea of what effects I like and also can use ones that don't have such a high performance hit.

I'm pretty sure something is wrong for me with the Halation one. It just looks bad in everything I've tried, everything appears very jagged/blocky. It's particular noticeable with text. Would this be maybe something unsupported for opengl on my video card? I'm testing the Intel HD 3000 here but seem similar results on the Nvidia GTX 570.

Again, I'm not great with what this stuff is supposed to look like, so maybe it's just me.

I got the following output when running it, but it happens with both shaders:

Code: [Select]
../../../../../src/osd/modules/opengl/gl_shader_tool.c:334: GL Error: 1282 0x502

../../../../../src/osd/modules/opengl/gl_shader_tool.c:334: GL Error: 1282 0x502

../../../../../src/osd/modules/opengl/gl_shader_tool.c:343: GL Error: 1282 0x502

../../../../../src/osd/modules/opengl/gl_shader_tool.c:343: GL Error: 1282 0x502

../../../../../src/osd/modules/opengl/gl_shader_tool.c:343: GL Error: 1282 0x502

../../../../../src/osd/modules/opengl/gl_shader_tool.c:325: GL Error: 1282 0x502

../../../../../src/osd/modules/opengl/gl_shader_tool.c:325: GL Error: 1282 0x502

../../../../../src/osd/modules/opengl/gl_shader_tool.c:325: GL Error: 1282 0x502

Halation (highlighted, the title font is jagged, but here it's very drastic)


Same here, the title and arrow look bad (this is paused so it is darker than usual)



Lottes - just from my perspective, or maybe it covers up certain imperfections looks great




« Last Edit: June 15, 2015, 08:33:07 PM by liquid8d »

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Showing off GLSL Mame.
« Reply #89 on: June 16, 2015, 12:11:55 AM »
This is how Metal Slug X looks on my side - with halation shader.
I'm praising halation because it looks soooooo good.
Now I can understand why you don't like it. It looks horrible on your side. It's not suppose to look like that.
« Last Edit: June 16, 2015, 12:29:19 AM by verion »