Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: Luke_Nukem on June 09, 2015, 03:33:12 PM

Title: Showing off GLSL Mame.
Post by: Luke_Nukem on June 09, 2015, 03:33:12 PM
Hi all. Been a while since I've been on here.
I have a couple of videos to show off;

GLSL Mame;
https://youtu.be/AJD8qB1nofU (https://youtu.be/AJD8qB1nofU)
Running under Linux. Front end is AttractMode of course. Runs very slick.

Booting from USB to AttractMode;
https://youtu.be/E6s3h3q8o5A (https://youtu.be/E6s3h3q8o5A)
This is running a custom build of Arch, basically an ISO built around a very stripped down version of Arch, and booting straight into X with AttractMode running once loaded.
Takes around 35 seconds. Slightly less once installed to HDD.
The source to the build will be available on GitHub soon, and you require an Arch system to build it.  ;D

And a quick play test;
https://youtu.be/8furOI4b4DM (https://youtu.be/8furOI4b4DM)
At the end, it takes about 2 seconds to shutdown  :D

The AM theme is one I built a while ago, called swapper. I plan to update it soon.
Title: Re: Showing off GLSL Mame.
Post by: raygun on June 10, 2015, 12:23:25 AM
Hey long time no see Luke, welcome back!
Title: Re: Showing off GLSL Mame.
Post by: verion on June 10, 2015, 12:40:59 AM
Finally! Someone with working GLSL shaders with scanlines.
I couldn't find any GLSL CRT-geom related post that aren't 1 or 2 years old :D

---

Can you describe your GLSL config? Or better - can you upload your shaders and mame.ini config?

---

I'm interested in CRT-Geom like shader effect (like Timoty Lothes scanline for GLSL)
The best I could achieve is CRT-Geom.vsh (http://www.mameau.com/mame-glsl-shaders-setup/)
Well... frankly, this is the best because... it is the only one that I've manage to work :)

You can chceck it out on video https://youtu.be/gFrgUmpRzSc

This a big step, but it is less than perfect. It is lacking something that is called "halation" or "phosphor glow" on various forums.
Without it the scanlines "gaps" are too dark and too much prominent.

---

Maybe Lottes-crt shader is my answer.
This is a Lottes HLSL conversion for GLSL (http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Board=mamechat&Number=332320)

I've downloaded it, but it is not working in my setup (SDLmame 0.149) - failed to process shader

---

SDLmame is using shaders in format:

shader_name.vsh
shader_name_idx16_lut.fsh
shader_name_rgb32_dir.fsh
shader_name_rgb32_lut.fsh
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 10, 2015, 03:14:50 AM
Hey long time no see Luke, welcome back!

Thanks man. I've been pretty darn busy the last year. Quit work to become a full time student (Computer Science, Major in Software Dev).
And! Started a small biz, http://garagearcades.co.nz (http://garagearcades.co.nz)

Finally! Someone with working GLSL shaders with scanlines.
I couldn't find any GLSL CRT-geom related post that aren't 1 or 2 years old :D
**SNIP**

Here's what I've got so far. https://drive.google.com/file/d/0B9pq0zhpogv2SDNjdXF5VGNrclE/view?usp=sharing (https://drive.google.com/file/d/0B9pq0zhpogv2SDNjdXF5VGNrclE/view?usp=sharing)
I've included my mame.ini, just look at the glsl section to see how to enable it.

I'd love to dig into the Mame source and start building in menu functionality to change the shader parameters from within Mame. Maybe one day..
Title: Re: Showing off GLSL Mame.
Post by: verion on June 10, 2015, 03:42:36 AM
Thanks, but it is the same shader that I'm using. :(
And your settings are more or less the same as mine.

I'm attaching a screenshot how it could look with "halation" enabled - whatever it means.
But what it does is more important - it just "leaks" color of adjacent lines over the scanline dark lines.
Just like on CRT screen where every line "glows" and that blends the lines together nicely.

You can read more about this in this article - http://filthypants.blogspot.com/2012/07/customizing-cgwgs-crt-pixel-shader.html

---

That Lottes GLSL shader (link in prev. post) supposed to do that - judging from the screenshots in the thread (here - http://tinyurl.com/lottes-crt-GLSL).
But it is not working - and I don't have a clue how(if) this could be fixed.

---

If someone wants to play with that Lottes Shader I can upload it here - since you have to register in that other forum to download it.
Title: Re: Showing off GLSL Mame.
Post by: nitrogen_widget on June 10, 2015, 09:51:26 AM
Verion,

What video card do you have?
Which drivers for the card?

when I first tried GLSL on my setup it wouldn't work with the proprietary AMD drivers but worked with the opensource drivers.
Also, I found if your card doesn't support the proper shader model mame ignores the glsl settings.
Unless you have an AMD apu onboard graphics probably wont work.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 10, 2015, 09:56:20 AM
Intel HD Graphics 5000 with system provided drivers.
I'm on mac (OS X) - so probably no opensource drivers ;)
it's the last column - https://developer.apple.com/opengl/capabilities/
Almost all OpenGL functions are supported.

Code: [Select]
SDL/OpenGL defines: SDL_COMPILEDVERSION=1215 USE_OPENGL=1 USE_DISPATCH_GL=1
Compiler defines A: __GNUC__=4 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)"
Compiler defines B: __amd64__=1 __x86_64__=1
Compiler defines C: _FORTIFY_SOURCE=2
SDL Device Driver     : Mac OS X display
SDL Monitor Dimensions: 1920 x 1200
Enter sdlwindow_init
Using SDL single-window OpenGL driver (SDL 1.2)
Leave sdlwindow_init
Loaded opengl shared library: /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib
OpenGL: Intel Inc.
OpenGL: Intel HD Graphics 5000 OpenGL Engine
OpenGL: 2.1 INTEL-10.6.20
OpenGL: forcing power-of-2 textures (creation, not copy)
OpenGL: vertex buffer supported
OpenGL: pixel buffers supported
OpenGL: framebuffer object supported
OpenGL: GLSL supported
OpenGL: max texture size 16384 x 16384



But GLSL is working - with certain shaders (like the one that Luke_Nukem is using). But I want that halation/phosphor glow - and that particular shader doesn't provide it (I suppose).
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 10, 2015, 10:30:57 AM
So the CRT-Geom linked in http://filthypants.blogspot.com/2012/07/customizing-cgwgs-crt-pixel-shader.html is different from Lottes shader, right? I tried Lottes and that looked really nice but since the machine in my current arcade setup can't handle them, I haven't gotten around to really fine tuning it.

Did you try the CRT-Geom one and does that not do what you want with the halation, or is Lottes just better and you want to use that?

Also, who wants to get these converted over to shaders to be used directly in AM? I tried at one point and it was a bit too complex for me :)

Here is Lottes code:
https://www.shadertoy.com/view/XsjSzR#

And you can read about it here:
http://timothylottes.blogspot.com/2014/08/scanlines.html
Title: Re: Showing off GLSL Mame.
Post by: verion on June 10, 2015, 10:43:20 AM
Quote
Did you try the CRT-Geom one and does that not do what you want with the halation

Exactly - CRT-Geom works and looks good, but I'm hoping for even better look with that "glow".

I don't know if Lotte would be better - I just can't see any other options.

-----

I've made a quick fake effect in photoshop.
On the left CRT-Geom how it is now, on the right with halation/glow.


The scanlines gets little less dark.

----

I can have similar effect with adding gaussian blur shader as next shader, but the effect is more, well... blurry, and that's not my goal.

============

RE: link to Lotte code

Some guy went a litte further and actually converted this to GLSL
I posted the link in my first post
Quote
This is a Lottes HLSL conversion for GLSL (http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Board=mamechat&Number=332320)

The problem is - everybody in that thread were bursting with joy, but I can't get it to work :(
Well... Everything I did was - download the shader, put it in shader dir, and change mame.ini.
There is nothing more I can do - maybe except reading -verbose output.

Maybe I should upgrade SDLmame - since I have older version, that is using older (1.2) SDL libraries and there are newer to download (2.0).
But I have to upgrade my roms in a process - and you now how pleasant it is :)
But I doubt if it will help - because my SDLmame version was the current one when they were posting that Lottes GLSL shaders.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 10, 2015, 12:34:00 PM
@Luke_Nukem

Seems like I'm slowly overtaking your post - sorry about that.
Maybe Omegaman could move my ramblings to separate thread - please.
Title: Re: Showing off GLSL Mame.
Post by: nitrogen_widget on June 10, 2015, 02:03:47 PM
Intel HD Graphics 5000 with system provided drivers.
I'm on mac (OS X) - so probably no opensource drivers ;)
it's the last column - https://developer.apple.com/opengl/capabilities/
Almost all OpenGL functions are supported.

Code: [Select]
SDL/OpenGL defines: SDL_COMPILEDVERSION=1215 USE_OPENGL=1 USE_DISPATCH_GL=1
Compiler defines A: __GNUC__=4 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)"
Compiler defines B: __amd64__=1 __x86_64__=1
Compiler defines C: _FORTIFY_SOURCE=2
SDL Device Driver     : Mac OS X display
SDL Monitor Dimensions: 1920 x 1200
Enter sdlwindow_init
Using SDL single-window OpenGL driver (SDL 1.2)
Leave sdlwindow_init
Loaded opengl shared library: /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib
OpenGL: Intel Inc.
OpenGL: Intel HD Graphics 5000 OpenGL Engine
OpenGL: 2.1 INTEL-10.6.20
OpenGL: forcing power-of-2 textures (creation, not copy)
OpenGL: vertex buffer supported
OpenGL: pixel buffers supported
OpenGL: framebuffer object supported
OpenGL: GLSL supported
OpenGL: max texture size 16384 x 16384



But GLSL is working - with certain shaders (like the one that Luke_Nukem is using). But I want that halation/phosphor glow - and that particular shader doesn't provide it (I suppose).

when I hear GLSL I think Linux. :)
your on-die graphics might not cut it.
Also, SDL 2.0 may be required so you may be onto something there.

I've only used sdl 2.0 mame with linux and GLSL.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 10, 2015, 05:11:50 PM
@Luke_Nukem

Seems like I'm slowly overtaking your post - sorry about that.
Maybe Omegaman could move my ramblings to separate thread - please.

Na leave them all here.
Also, your GPU supports OpenGL 4.0, so it shouldn't have any problems.

I see what you mean by the effects now. Going to look into it. Just finished final exam and have a bit of spare time.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 10, 2015, 05:23:06 PM
Great!

You can emulate similar effect with enabling bilinear shader (the one that was in your shader folder).
Not exactly the same, because everything starts to look blurry (especially the fonts/scores).

glsl_shader_mame0         /Applications/MAME/SLDmame0149-64bit/shader/shader/glsl_bilinear
glsl_shader_mame1         /Applications/MAME/SLDmame0149-64bit/shader/CRT-geom

My photoshop fake was constructed with CTR-geom "pass" on 80% opacity and the same image with heavy blur put underneath.

I'm also attaching Lottes shader - maybe you can try it and let me know if it works on your system.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 10, 2015, 08:22:25 PM
Try the two shaders attached. Mish-mash of others like Lottes.

The order you enable them in has a big effect on the picture. I'm still playing around with them to see what is going on.

edit: Added shadowmask to the CRT-geom shader. Seems okay.
Still working on pixel bleed. And mask size

Position of Mask multiplier has a profound effect.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 10, 2015, 09:45:31 PM
About as good as I can get it without writing my own. (Which I sort of started).

[attachment deleted by admin]
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 10, 2015, 09:52:32 PM
Comparison between the lottes and the modified CRT-Geometry shader.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 10, 2015, 10:04:02 PM
With the last attached shader, I've exposed these vars;

  maskDark = 1.2; //Sets how dark a "dark subpixel" is in the aperture pattern.
  maskLight = 2.0; //Sets how dark a "bright subpixel" is in the aperture pattern.
  scanlineDarkness = 0.4; //Darkness of SCANLINES. Has a profound effect. 0.0 = dark__1.0 = non existant.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 11, 2015, 12:08:25 AM
Looking great.

Although when compared to Lottes the colors looks a little bit washed, less saturated, less vibrant.

-------

Now the bad news (for me).

It’s time to upgrade my SDLmame.
It’s not working - I’m getting black screen.

First it was complaining that:
CRT-geom_idx16_lut.fsh
CRT-geom_rgb32_lut.fsh
files are missing.

So I’ve assumed that I have to copy it over from old shader.
And after that - no errors but a black screen only.
The game is working - I can hear the sounds, instert the coin, start game, etc.

One question - are you applying glsl_plain shader first? or just CRT-geom?
Title: Re: Showing off GLSL Mame.
Post by: verion on June 11, 2015, 02:22:10 AM
IT WORKS!
Thanks man!

---

I've updated SDLmame to .161 and it is working beautifully.

- no need for that extra files, only those 2 you've provided in CTR-GEOM-FINAL
- it doesn't look washed at all

Overall - great job!

---

I must say I wasn't much into that simulation of crt geometry  - but your settings are more subtle than original CRT-geom - and I've started to like it that way. So thanks again.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 11, 2015, 02:59:11 AM
Good to hear. I'm trying to do a CRT geometry only shader that can be applied after Lottes shader....

It's very hard work!!!
Title: Re: Showing off GLSL Mame.
Post by: verion on June 11, 2015, 03:08:29 AM
On the other hand - upgrading SLDmame didn't help with Lottes shader - still not working, but I don't need this anymore with your shader.

------

Only in a few games (mslug or mutnat - for example) it is not working properly, it cuts off part of the screen - see screenshot.

It seems that it is affecting only NEOGEO games (damn - my favourite titles). Maybe it is "by design" - because those parts of the screen supposed to be covered with bezel? it seems so - because all info on top of the screen is untouched - even margins from top and side of the screen. (see second screenshot)

I didn't notice it earlier without CRT curvature, because with CRT geom it is more visible because it cuts off that lovely rounded corners.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 11, 2015, 11:48:09 AM
Can you try changing the pixel aspect in mame?
I'll look in to it further. Seems likely that the stock crt-geom shader will also do it.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 11, 2015, 06:52:23 PM
I ended up stripping the CRT-Geom shader to the bare essentials for only geometry. I don't know shader language well enough to be able to make it universal enough to apply to other shaders after they load. It gives me a blocky picture.

HOWEVER!!! Doing this has enabled me to be able to add it to the Lottes shader! I've done some heavy revision of the Lottes shader, stuff like exposing variables in a more logical place (Look in the .vsh and tweak away), and cleaned up the formatting a lot.

You can see the results. It looks pretty darn good.

[attachment deleted by admin]
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 11, 2015, 07:09:06 PM
More comparison pics. You can tweak the Gamma and YUV to get nice effects.

I'm leaving this as is for now. It would be much better to get HLSL2GLSL working or something. Damn you Microsoft!!!
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 11, 2015, 09:24:24 PM
How about the Halation shader? It looks really good, so I converted it and also put the CRT shape Geometry code in.

[attachment deleted by admin]
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 11, 2015, 09:44:33 PM
Very nice! Would you be able to convert those to shaders for AM at some point? I played with it a bit and some of them were a little too complex for me :)
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 11, 2015, 10:44:13 PM
Very nice! Would you be able to convert those to shaders for AM at some point? I played with it a bit and some of them were a little too complex for me :)

I'm definitely trying :D
Title: Re: Showing off GLSL Mame.
Post by: verion on June 11, 2015, 11:05:26 PM
Quote
I'm leaving this as is for now. It would be much better to get HLSL2GLSL working or something.

Your shader in "as is" state is the best shader I was using - ever!
And I even didn't try the new (improved) ones yet!

Great job!

----

RE: shader for AM

It would be great. Especially when used in dedicated cabs with LCD - we could "emulate" CRT all the way from front-end to game emulation - it would be really seamless transition from fe to game.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 11, 2015, 11:10:58 PM
RE: screen sides cut-off

Quote
Can you try changing the pixel aspect in mame?
I'll look in to it further. Seems likely that the stock crt-geom shader will also do it.

Yes, I've tried. I've also tweaked curvature and round corners to see if it change anything - no change.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 11, 2015, 11:25:31 PM
RE: screen sides cut-off

Yes, I've tried. I've also tweaked curvature and round corners to see if it change anything - no change.

I tried it also. Seems to be the game or mame itself. The green rom check screen on boot is correct, just not the actual game.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 12, 2015, 12:01:00 AM
Same on my side. And it is the same without CRT-Geom shader - so I think it is "by design" and those sides supposed to be covered with bezel. You know - now we are "recreating" round corners because of nostalgia, but the original design could be oposite - like "cover the sides to get pointy corners"

---

But my goal is to have the same look for all games.
Additionaly some parts of the screen are not cut completely - like bottom corners in mslug, or in mutnat the "cutted" parts are showing when screen flashes.

I've came up with idea how we can overcome this - since it is kinda ruining the overall experience.
I can make an overlay + .lay file to add fake round corners and mask the sides properly - for those misbehaving games.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 12, 2015, 02:23:24 AM
Halation shader in AM, grab it from the git. https://github.com/Luke-Nukem/attract-extra (https://github.com/Luke-Nukem/attract-extra)

This can also be used in Mame directly. Probably not the final version, needs some cleaning up and optimization.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 12, 2015, 02:27:49 AM
This is sweet!
How this can be applied to AM?
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 12, 2015, 02:36:38 AM
This is sweet!
How this can be applied to AM?

Look at the example in the GitHub link I provided.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 12, 2015, 03:32:58 AM
Great! Got it working!

You make my dreams come true! Just like that!
If you want - I can make a nice intro for your business in return.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 12, 2015, 04:21:45 AM
Great! Got it working!

You make my dreams come true! Just like that!
If you want - I can make a nice intro for your business in return.

That would be totally awesome!!!!

Aww man. Mame is being a complete basterd with formatting of shaders. Somehow I keep ending up with garbage like "syntax error, unexpected $end, expecting "::" at token "<EOF>""
I modified a number, and got that. Works fine in AM though.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 12, 2015, 05:44:10 AM
I'll send you PM and we can arrange that.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 12, 2015, 05:59:11 AM
I think I've finally fixed the $EOF error for Mame. The shaders in the git should be completely universal now.
Title: Re: Showing off GLSL Mame.
Post by: omegaman on June 12, 2015, 07:35:11 AM
Luke-

Looks great man. How much does this tax your system? When I was playing around with HLSL using d3d or GL there was a noticeable performance hit. I was running a decent rig as well. And, I think my video card at the time was nvidia which supposedly handles opengl better than ATI cards or is that backwards? Anyway, I probably need to get caught back up on this stuff.

You probably already know about this but here is a great site for info on shaders and real time shaders with lots of code examples.

http://www.ogre3d.org/tikiwiki/tiki-index.php?page=JaJDoo+Shader+Guide+-+Part+1+-+The+Basics&structure=Cookbook (http://www.ogre3d.org/tikiwiki/tiki-index.php?page=JaJDoo+Shader+Guide+-+Part+1+-+The+Basics&structure=Cookbook)
Title: Re: Showing off GLSL Mame.
Post by: verion on June 12, 2015, 07:39:40 AM
on i5 1.3 Ghz and on-chip intel HD5000 there is no performance hit at all - in every (a few) game that I've tried.
Title: Re: Showing off GLSL Mame.
Post by: omegaman on June 12, 2015, 08:56:44 AM
That is good to know. I'll have to check it out.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 12, 2015, 12:47:11 PM
Forgot about Ogre3d site. I'm old enough to remember when it first started out. (and the crystal space portal engine).

What are you guys load times?
On my MSI GS70 Stealth 2od laptop, I can switch between Intel graphics or Nvidia. Nvidia loads around 3 times faster.
Running Linux only, btw.

And on the test arcade cab, that runs an Nvidia GF 8600gt, an M2N-MX SE motherboard + Athlon 64 x2. No performance hit at all.
The bare minimum spec I've found is p4 3ghz for mame, 8600gt for shaders. <<< runs everything except 3d games like Tekken.
And to run mame 3d games at full speed, you need a modern dual core, like an AMD Bulldozer cored cpu.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 12, 2015, 01:23:12 PM
game load time? about 3 sec to boot screen. but this is from pci ssd disk.
Title: Re: Showing off GLSL Mame.
Post by: omegaman on June 12, 2015, 04:02:46 PM
My MAME cabinet is still running on a core duo 3 GHz with nvidia 8500 GT card in it. HLSL ran on it but there was some performance issues with certain games etc...

This was around 2013 though, so I'm sure there have been improvements since then. I just got my raspberry PI, so it should be fun testing some of this stuff out. Though, I am a little skeptical this will work efficiently on the PI2. 
Title: Re: Showing off GLSL Mame.
Post by: verion on June 12, 2015, 04:19:44 PM
I've read that RPi is doing all GL stuff as software layer - not gpu accelerated. It doesn't sound good.

I've got tired with RPi after trying to run XBMC on it. It kinda worked, but interface slow-downs were annoying (but HD content was played flawlessly).
So the RPi was covering dust since. A few weeks ago I've made Wordpress server out of it for local websites development.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 12, 2015, 04:45:48 PM
I really wouldn't expect the RPi2 or any of those types of devices to be able to do decent GL stuff like shaders. Much less if done in software.

Just updated the https://github.com/Luke-Nukem/attract-extra again. Decided to split the AM and MAME versions of the shaders apart. Getting issues with MAME not liking variables being of 'uniform' type which is required by AM to be able to assign values from .nut scripts.

I'll convert the other CRT style shaders to AM soon too.


EDIT: Added Lottes shader to git. Shader includes CRT geometry code in it.
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 12, 2015, 06:28:51 PM
Awesome job!

The Basic one looks great, runs great! Halation drags my system a bit - if I open the menus there is quite a delay in key presses - I am on an older MBP not the greatest of specs, but it feels like maybe something is dragging it down?I also noticed switching between the layouts seemed to cause weird results, or crashed AM (1.5.2-64bit). For instance,  the Lottes one Was messed up (small black boxes rather than scanline look), but when I exited and came back in it was fine.

I'll give them another shot on my better spec'd PC, but I am super glad you are getting these working!

Are you putting the Mame ones on there as well, or somewhere else? Also, you can pass the values for your shader variables from AM, right? It'd be cool to include those in the layout config to play with the settings :P
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 12, 2015, 07:48:40 PM
I keep updating the Git. The Basic one isn't mine, it's one that Raygun already converted.

It's bound to drag a bit. The Halation one is doing a heck of a lot of passes. But I've trimmed it back a fair bit and done some clean-ups. The latest git commit should be good.
As an example, on my Intel gpu, it took approx 3-4 seconds to load a game. With the new version on git, it takes about 1.5 seconds or less. And the Gaussian filter is doing around 6 passes less per pixel I think. I'll keep tweaking away at it.

The Lottes one, I get glitches also. Still trying to work that one out.

Mame shaders are included in both folders (MAME__*shadername*.tar.gz) just extract them to mame/osd and update your mame.ini accordingly. You should only use one shader. No extras, and turn off all extra filtering.

Attract Mode reloads the shaders each time it loads a new layout or refreshes the layout. If the shader is taking a while to load, that's where the slow down is.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 13, 2015, 12:01:14 AM
More tweaking. Shader now loads a heck of a lot faster on Nvidia hardware. (Halation Shader, AM + Mame).
Can you guys test it please?
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 01:08:14 AM
I'm on it.
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 13, 2015, 01:18:09 AM
Just gave the AM shaders a try.. I'm still getting a some weird results but the halation is definitely faster.

I have 2 machines I'm testing on:

MBP w/ Intel HD 3000, i5 2.3Ghz ( Win 8 )
Basic and Halation work fine
Lottes is funky - first it looked like little flies buzzing around the screen.. best I can describe it :) Then just blank screen.
Each time I try to switch from any one of them to the other, AM crashes.

Desktop w/ Nvidia GTX 570, i7 3.8Ghz ( Win 7 )
Halation is about 1/6 of the layout size, in the center of the screen. I tried changing the layout res to match my desktop and it made it smaller! The effect is there, but the layout is shrunk.
Lottes is completely black
This one does not crash when I switch layouts

Won't get to test the Mame ones until tomorrow
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 01:25:24 AM
RE: halation-crt

I must say I like the previous one better (CRT-geom).
It gives me more crisp image - without beeing pixelated. The last one is more muddy.

I have to try that in games - maybe it is better with moving objects.

----

RE: lottes-crt

It gives me corrupted screen ("little flies buzzing around the screen")
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 13, 2015, 01:48:41 AM
I'm not worrying about Lottes for the moment, just focusing on Halation.

I'll upload the changes I've made soon, done some heavy tweaking.
Don't forget to open the CRT-halation.vsh for mame, and make adjustments.

Also, open the layout and fiddle too, specifically for both of them, change the aperture, as this has the largest visual impact right after bloom.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 01:50:50 AM
Not working in mame for me.

I've copied shaders to my shader dir from your github layouts (and of course changed mame.ini) - it that ok? Or maybe I'm missing something.
Shaders are "working" - no errors, game starts, I can hear the sound - but the screen is blank (black).
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 13, 2015, 02:09:24 AM
Not working in mame for me.

I've copied shaders to my shader dir from your github layouts (and of course changed mame.ini) - it that ok? Or maybe I'm missing something.
Shaders are "working" - no errors, game starts, I can hear the sound - but the screen is blank (black).

No, you need to use the ones in MAME__CRT-halation.vsh.tar.gz
The AttractMode shaders have to use a different variable initializer to be able to modify variables in script.
Technically the Mame versions should work in AM, but you have to open the .vsh to do tweaking. AM versions != work in Mame.

So open the layout.nut, and look at each shader.set_param, I've included comments to help work out what each do too.

The attached screens are with aperture set to 2.0 (You have to use floats, I can't get AM to pass through integers).

JUST TO BE CLEAR - PLAY WITH THIS
Code: [Select]
                // APERATURE_TYPE
                // 0 = VGA style shadow mask.
                // 1.0 = Very compressed TV style shadow mask.
                // 2.0 = Aperture-grille.
                shader.set_param( "aperature_type", 2.0 );

[attachment deleted by admin]
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 02:55:35 AM
Please forgive me my ignorance - but belive me, this is the first time when I'm using Github :)

I can't find MAME__CRT-halation.vsh.tar.gz anywhere in https://github.com/Luke-Nukem/attract-extra

only
/layouts
/plugins
/romlists

and there is no MAME__CRT-halation.vsh.tar.gz in any of that folders.
I'm clueless.

I'm more comfortable with juggling my pixels.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 13, 2015, 03:12:21 AM
Shit. Must be in my .gitignore list.
Attached now. (can open with 7zip or similar)
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 03:50:22 AM
OK. Now I can see it on Github too.

Working great.
100% frames all the time.
CPU at around 50%

As a side note - my laptop is getting pretty hot, I think it is more from GPU than CPU.

---

You've said that the halation is very tasking - is there a way to disable halation in .vsh for slower system?

If
additive_bloom = 0
bloomAmount = 0
the halation is off?

---

BTW can you post your mame.ini for reference?
I would like to see what do you mean by saying "No extras, and turn off all extra filtering"
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 13, 2015, 04:16:03 AM
I'm considering making a switch to disable Bloom. Trying to work out the calculation count is a little hard, I think it's around 130 calculations per pixel.
What will most likely happen is the GPU will utilize all it's shader units, which is basically the whole programmable pipeline.

You might be better off to try the Lottes shader for Mame if you just want to remove Bloom. I bet it get's just as hot though.

The original Halation did a heck of a lot more calculations, I'd guess from memory, approx 90 or more extra per pixel.

EDIT::
additive_bloom = 0
bloomAmount = 0

Bloom is always on atm. So setting bloomAmount to 0.0 just means it will be doing math with a 0.0 amount, mostly addition and multiplication.

additive_bloom = 0.0; will switch the final bloom calculation to a slightly different one where it isn't just adding the worked out Bloom to the existing screen pixels. Not worth turning off to be honest, unless you like the look of the different pipeline.

I'm still learning the GLSL, it's a pretty big step up from what I've been studying at University, but at least I can think like a programmer and work things out  ;D

I'll see if I can sort out the AM version of Lottes tomorrow. It should be fine for the Mame version though.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 06:12:42 AM
I can see you uploaded Lottes shader too - I'll try that and let you know.

---

Not working - gives me black screen (but the game is running).
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 13, 2015, 09:17:45 AM
Shit. Must be in my .gitignore list.
Attached now. (can open with 7zip or similar)

I knew I wasn't crazy! :) Trying these now..

MBP/Intel HD 3000:

Halation in Mame works - very slow on this one as expected :) I probably need to play around with the settings. Tried SF2 and didn't like the overall look.

Lottes in Mame worked great, looked great and very fast!

i7 / Nvidia GTX 570

Both seem to work great speed-wise, but I get that same issue where it is shrunk in the middle of the screen for both Lottes and Halation. I took a mame snapshot and it comes out at 384x224. This may not be specific to your shaders, I need to try some other ones on that PC. Pretty sure I updated to the newest drivers after the issue last time but I'll double check.

I don't know if these will help you or if you have already seen them.. at least one has the actual CRT curvature on the picture, not sure if you are interested in doing that. It looked a bit overdone in the one I tried:

http://www.mameau.com/mame-glsl-shaders-setup/ has a pack of shaders (this is from 2013)

https://github.com/douglaslassance/mame/tree/master/glsl (also around 2013)
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 11:19:58 AM
Quote
http://www.mameau.com/mame-glsl-shaders-setup/ has a pack of shaders (this is from 2013)

This is the CRT-Geom shader that Luke-Nukem and I were using initialy.
It is also the only one that was working with SDL 1.2 libraries - so maybe a good shot for RPi and mame4all

Quote
Lottes in Mame worked great, looked great and very fast!

I can't get it to work - what version of mame you are using on OS X?
I'm using SDLmame 0.161 and SDL libraries 2.0.3
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 13, 2015, 12:02:28 PM
Sorry, I'm on Windows... Mame 0.162. Maybe I can try booting into OSX, but I don't have anything setup, so might take me a bit :)
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 12:07:25 PM
ha... my assumption was that on MBP you are using OS X :D

That's too bad - because I was happy to see that you are using OS X - so maybe you can test (and hopefully fix) that full/fill screen bug on OS X.
Also on OS X AM crashes from time to time - I have to post it with crash report on forum or Github.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 13, 2015, 01:09:42 PM
The Lottes shader is basically the same thing as the Halation shader. Just doesn't have bloom in it.

Also I'm doing everything on Linux, and testing with Intel and Nvidia.

Can you guys please play with the settings for Halation before saying that you don't like it. Adjusting bloom and aperture settings has the greatest impact on the looks.
You need to open the vsh file. Everything is commented.

And also, run AM and Mame from a console/terminal so you can see any errors getting thrown up.

Lastly, use Mame 1.62.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 13, 2015, 01:37:31 PM
I like the current halation version - a lot. I is crisp again. And it suits me out-of-the-box without any tweaking.
I tweaked it a little bit - but returned to standard settings eventually.

Quote
The Lottes shader is basically the same thing as the Halation shader. Just doesn't have bloom in it.

So I can simply skip Lottes - especially when (if) you implement halation on/off switch in .vsh

---

I'm running from console (when testing) and no errors for halation or lottes (but lottes gives me blank screen).
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 13, 2015, 05:08:47 PM
Just to be clear - I'm NOT one to be asking how it looks so take anything I say about that with a grain of salt :) I can say if it looks good to me, but I don't really have a good idea of what it is 'supposed' to look like.

I'm more testing that it works but I will play around with the settings some to see if I get it to something I like. Working on some updates and will be trying it again in OSX shortly.
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 13, 2015, 07:18:36 PM
Ok, OSX results. First AM shaders:

Basic CRT works fine.

Halation takes a good while to startup, but once it does it runs pretty smoothly! This is both when you switch to it and hit ESC to go back to the layout and on startup.

Lottes is completely black.

However, all three - when I first start AM are black. I have to switch to a different layout and then back to make it work. Not sure if that's an AM bug, but maybe?

MAME is up next, but I'm having a hell of a time getting it to load my roms for some reason..
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 13, 2015, 08:28:12 PM
Mame results:
OSX Yosemite 10.10.3
SDLMame 0.162
SDL 2.0.3

Both worked fine, but Halation pretty slow (of course on this machine it will be)


CRT-lottes
(http://i.imgur.com/E0IkJIu.png)

(http://i.imgur.com/gq5Xw0k.jpg)

CRT-halation

(http://i.imgur.com/rZiP9wx.png)

(http://i.imgur.com/KXLMGdv.jpg)

Title: Re: Showing off GLSL Mame.
Post by: verion on June 14, 2015, 03:56:07 AM
Hmmm...

Lottes works on your side (OS X)?

I've upped to 0.162 to see if it is the case - and no go. I'm getting black screen with lottes.
With the same setup:
OSX Yosemite 10.10.3
SDLMame 0.162
SDL 2.0.3
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 14, 2015, 01:31:37 PM
I've just tested these shaders after tweaking. Zipped as working.

In CRT-halation.vsh, there is a switch;
Code: [Select]
    // BLOOM ON/OFF SWITCH
    bloom_on = 0.0;

Set that to 1.0 to enable bloom, 0.0 to disable.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 14, 2015, 01:57:22 PM
Great!

I'm downloading.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 14, 2015, 02:13:26 PM
I've also started separating effects into their own screen shaders, so it should be possible to mix/match shaders to get a particular effect.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 14, 2015, 02:27:25 PM
hmmm... strange

with bloom_on = 0.0 the fans starts spinning almost right away - as with previous halation.

---

I couldn't tell the difference, so I took 2 screenshots... looks identical with 0 or 1
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 14, 2015, 03:29:58 PM
hmmm... strange

with bloom_on = 0.0 the fans starts spinning almost right away - as with previous halation.

---

I couldn't tell the difference, so I took 2 screenshots... looks identical with 0 or 1

Open up the .fsh file and remove this code block;

Code: [Select]
    if (bloom_on == 1.0){
        gl_FragColor.rgb += Bloom(pos) * bloomAmount;
    }

See if that makes any difference
Title: Re: Showing off GLSL Mame.
Post by: verion 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.



Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem 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.
Title: Re: Showing off GLSL Mame.
Post by: verion 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
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem 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 (https://github.com/Luke-Nukem/attract-extra)
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem 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.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem 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.
Title: Re: Showing off GLSL Mame.
Post by: verion 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.
Title: Re: Showing off GLSL Mame.
Post by: verion 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.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem 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.
Title: Re: Showing off GLSL Mame.
Post by: verion 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.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem 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.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 15, 2015, 03:33:49 PM
HQx2 is great - I don't see that much of a difference between HQx2 and HQx4
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem 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.
Title: Re: Showing off GLSL Mame.
Post by: liquid8d 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)
(http://i.imgur.com/4eeSBEE.png)

Same here, the title and arrow look bad (this is paused so it is darker than usual)
(http://i.imgur.com/HDMRKFV.jpg)


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

(http://i.imgur.com/DLOdHkr.png)

(http://i.imgur.com/OUoYzHe.jpg)
Title: Re: Showing off GLSL Mame.
Post by: verion 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.
Title: Re: Showing off GLSL Mame.
Post by: liquid8d on June 16, 2015, 12:29:48 AM
Good, I'm not going crazy. Yours looks great! There is definitely something wrong. Look at the SNK logo or copyright symbol (or any of the things I highlighted).

I tried some of the individual shaders that Luke so graciously has put together and something was definitely wrong with a couple. I'm going to keep playing with them for a while and post results from both machines a little later.
Title: Re: Showing off GLSL Mame.
Post by: verion on June 16, 2015, 12:31:46 AM
Maybe you could try how it looks on OS X. Since it is exactly the same setup as mine.
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 16, 2015, 03:49:36 AM
Good, I'm not going crazy. Yours looks great! There is definitely something wrong. Look at the SNK logo or copyright symbol (or any of the things I highlighted).

I tried some of the individual shaders that Luke so graciously has put together and something was definitely wrong with a couple. I'm going to keep playing with them for a while and post results from both machines a little later.

I suspect it's a setting that's messed up, such as the scanlines. I'll check it out, it may even be that it's getting the wrong texture/color map size and the calculations are getting skewed

More shaders here https://github.com/Luke-Nukem/attract-extra/tree/master/layouts/shaders
Title: Re: Showing off GLSL Mame.
Post by: verion on June 18, 2015, 07:23:52 AM
Can you add to CRT-Halation shader additional switch for disabling geometry distortion?
It would be great to have this - for making straight rectangle screenshots (for AM/MAME snaps).
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 18, 2015, 02:53:21 PM
Can you add to CRT-Halation shader additional switch for disabling geometry distortion?
It would be great to have this - for making straight rectangle screenshots (for AM/MAME snaps).

Sure, that's easy to do, I'll sort it out later.
Title: Re: Showing off GLSL Mame.
Post by: jimmer on June 30, 2015, 03:47:17 PM
What sort of monitors are you guys using?
Does this CRT shading needs something special? or do you get better results with better monitors?

Can I expect an OK result on my old DELL 1907FP 1280x1024 monitor ?

thanks
Title: Re: Showing off GLSL Mame.
Post by: Luke_Nukem on June 30, 2015, 08:39:09 PM
What sort of monitors are you guys using?
Does this CRT shading needs something special? or do you get better results with better monitors?

Can I expect an OK result on my old DELL 1907FP 1280x1024 monitor ?

thanks

Should be fine. I use an old 19" LCD in one of my machines. I find if you're using shaders, the higher the res you set the screen, the better the shaders effects. Not always true though as Mame can be set to switch res. And it can have an impact on performance.
Title: Re: Showing off GLSL Mame.
Post by: cmoses on July 12, 2015, 10:36:15 AM
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)
(http://i.imgur.com/4eeSBEE.png)

Same here, the title and arrow look bad (this is paused so it is darker than usual)
(http://i.imgur.com/HDMRKFV.jpg)


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

(http://i.imgur.com/DLOdHkr.png)

(http://i.imgur.com/OUoYzHe.jpg)

I am getting the same blocky appearance when I run the halation shader.  I am also using a nVidia card the 730GT.  Any updates on this issue.