Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: GLSL help  (Read 11164 times)

0 Members and 1 Guest are viewing this topic.

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 310
  • Last login:March 05, 2024, 06:55:10 pm
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
GLSL help
« on: May 11, 2012, 09:45:11 pm »
Hey guys! I'm pretty new to GLSL. I had it working one time then going to try it again I get the following error in the terminal

Code: [Select]
WARNING: font /fonts/Ubuntu-B.ttf, is not TrueType or BDF, using MAME default
cannot open shader_file: ./src/osd/sdl/shader/glsl_plain.vsh
OpenGL: GLSL loading mame bitmap shader 0 failed (./src/osd/sdl/shader/glsl_plain)
cannot open shader_file: CRT/CRT.vsh
OpenGL: GLSL loading mame bitmap shader 1 failed (CRT/CRT)
Segmentation fault (core dumped)
I tried Googling it with no luck. Seems more people use Mame in Windows which it's HLSL effect which is understandable as I use it as well but would like to have this working in Linux as well. I'm running Lubuntu 12.0.4 x64.

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 310
  • Last login:March 05, 2024, 06:55:10 pm
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: GLSL help
« Reply #1 on: May 13, 2012, 03:57:14 pm »
Anyone have any ideas? I've tried uninstalling MAME,re-installing it, and even deleted all the MAME.ini files I could find with no luck :(

eldiau

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:June 12, 2023, 06:01:40 pm
Re: GLSL help
« Reply #2 on: May 13, 2012, 08:11:46 pm »
Hey Hunk_4TH,
I use GLSL with cgwg CRT shader on my Ubutntu 12.04, it works quite well and I like it very much!

First get the latest version by cgwg called CRT-geom-20120130.zip here http://www.sendspace.com/file/gctlod unzip it in ~/.mame/CRT
Second get mame 0.145 sources from http://mamedev.org/, unzip and copy the mame/src/osd/sdl/shader folder in ~/.mame/CRT
you'll end up with something like this:
Code: [Select]
[1006] diego@mother ~> ls -l ~/.mame/CRT
total 36
-rw-r--r-- 1 diego diego 6866 Jan 31 02:21 CRT-geom_idx16_lut.fsh
-rw-r--r-- 1 diego diego 6866 Jan 31 02:21 CRT-geom_rgb32_dir.fsh
-rw-r--r-- 1 diego diego 6866 Jan 31 02:21 CRT-geom_rgb32_lut.fsh
-rw-r--r-- 1 diego diego 3096 Apr  2 17:15 CRT-geom.vsh
drwx------ 2 diego diego 4096 Apr 24 14:11 shader

now edit these lines in your mame.ini:
Code: [Select]
gl_glsl                   1
gl_glsl_filter            1
glsl_shader_mame0         /home/username/.mame/CRT/shader/glsl_plain
glsl_shader_mame1         /home/username/.mame/CRT/CRT-geom

change username to whatever your username is, take special care in not using ~ or $HOME, for some reason mame dosen't like that in those lines!
« Last Edit: May 13, 2012, 08:17:49 pm by eldiau »

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 310
  • Last login:March 05, 2024, 06:55:10 pm
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: GLSL help
« Reply #3 on: May 13, 2012, 09:24:11 pm »
Thanks for the detailed reply! I tried all that and get the following error while running mame via the terminal

Code: [Select]
WARNING: font /fonts/Ubuntu-B.ttf, is not TrueType or BDF, using MAME default
Unable to load effect PNG file 'scanlines_ag.png'
cannot open shader_file: ./src/osd/sdl/shader/glsl_plain.vsh
OpenGL: GLSL loading mame bitmap shader 0 failed (./src/osd/sdl/shader/glsl_plain)
cannot open shader_file: ./CRT/CRT.vsh
OpenGL: GLSL loading mame bitmap shader 1 failed (./CRT/CRT)
Segmentation fault (core dumped)

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 310
  • Last login:March 05, 2024, 06:55:10 pm
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: GLSL help
« Reply #4 on: May 13, 2012, 09:57:10 pm »
I tried again and it seems to be working now. Thanks so much for your help!!

eldiau

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:June 12, 2023, 06:01:40 pm
Re: GLSL help
« Reply #5 on: May 14, 2012, 04:41:33 am »
I'm glad it worked! cgwg work is great and not many people are using it!

You can customize the effects changing some variables in CRT-geom.vsh, I felt some effects were a bit too strong:

The overscan was cutting to much graphic:
overscan = vec2(1.00,1.00);

The curvature was a bit too much:
R = 3.0;

I didn't like the tilting:
const vec2 angle = vec2(0.0,0.0);

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 310
  • Last login:March 05, 2024, 06:55:10 pm
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: GLSL help
« Reply #6 on: May 14, 2012, 03:08:41 pm »
I agree his work is awesome! When I first saw this http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=76575#Post76575 (post with Metal Slug) I really wanted to use GLSL.

Yeah, I ran a few Vertical games and  the right side was a little titled. If you modified yours please feel free to post it :D

Btw, on the thread I linked to above cgwg advised people to use his shaders with the aperture effect effect. Though none of the effects seem to want to work for me. For example for testing MAME I usually use QMC2 and on the right side under Emulator log it says "Unable to load effect aperture.png. It seems to do this for all effects though they are obviously there :(

eldiau

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:June 12, 2023, 06:01:40 pm
Re: GLSL help
« Reply #7 on: May 14, 2012, 04:15:53 pm »
Overlay bitmaps must be in the artwork folder... but I don't think you should use an overlay with the last versions of CRT

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 310
  • Last login:March 05, 2024, 06:55:10 pm
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: GLSL help
« Reply #8 on: May 14, 2012, 05:01:12 pm »
I put them in the artwork but no luck ha ha. It's not a real big deal. The shader is more than impressive! Just don't like the slight tilt on the vertical games :( But like you said that can be adjusted :D