MAMEUIFX
http://mame32fx.altervista.org/forum/

OpenGL GLSL shaders
http://mame32fx.altervista.org/forum/viewtopic.php?f=4&t=248
Page 1 of 2

Author:  mamesick [ 30/10/2015, 20:47 ]
Post subject:  OpenGL GLSL shaders

From MAMEUIFX 0.167 we currently support 5 different shaders. Here are some pics of them in use.
NOTE: I'm using an LCD monitor and I have enabled "Widescreen Stretch" option. Also, I disabled curvature in the shaders to better show the final result. Though I'm a fan of this "flat" monitor effect and I currently use it to play games. The game used for tests is the well-known Black Tiger.

CRT Geom HQ (high CPU/GPU resources demanding)
Image

CRT Geom MQ (medium CPU/GPU resources demanding, very small loss in image quality)
Image

CRT Geom LQ (low CPU/GPU resources demanding, very big loss in image quality)
Image

CRT Geom Bloom (medium CPU/GPU resources demanding, derived from CRT Geom MQ)
Image

Lottes CRT (original version is very high CPU/GPU resources demanding, here is a modified light-weight version)
Image

All these shaders are distributed with MAMEUIFX package. You simply have to do:
1) Select "OpenGL" in Video Mode section of Display tab
2) Enable "Use GLSL" in OpenGL tab
3) Select the desired shader in the MAME Shader 0 slot under OpenGL Shaders tab
For CRT Geom Bloom shader, which is a multiple one, you have to do the following setup in OpenGL Shaders:
Image
All shaders have also their "Vertical" version which have to be used with Vertical oriented games.

That's all, feel free to post comments, questions, etc.

Author:  rodridie [ 04/11/2015, 15:19 ]
Post subject:  Re: OpenGL GLSL shaders

Mamesick, how do I completely remove the scanlines shader? On what line of sahder .vsh should I set?

Author:  mamesick [ 04/11/2015, 20:10 ]
Post subject:  Re: OpenGL GLSL shaders

rodridie wrote:
Mamesick, how do I completely remove the scanlines shader? On what line of sahder .vsh should I set?


I don't know what are you meaning... scanlines in the shaders cannot be disabled, they are the main feature of them. If instead you have an effect enabled that overlays the shaders, go to "Advanced" tab of options and click "Reset Effect". then Apply and Ok.

Author:  rodridie [ 06/11/2015, 0:17 ]
Post subject:  Re: OpenGL GLSL shaders

Hello Mamesick! See this image the crt-geom, does not have the correct curvature of the two sides. The right side of this unequal to the left! This happens in all vertical games. The horizontal are perfect! What will be what happens in vertical?

Attachments:
crtgeom.jpg
crtgeom.jpg [ 397.72 KiB | Viewed 10217 times ]

Author:  mamesick [ 06/11/2015, 9:03 ]
Post subject:  Re: OpenGL GLSL shaders

Open the related .vsh file with a text editor, and search this text:
Code:
  // tilt angle in radians
  // (behavior might be a bit wrong if both components are nonzero)
  const vec2 angle = vec2(0.0,0.01);

Verify that vec2 is the same as above, otherwise correct it.

This bug doesn't happen with the shaders I distribute. Though I know there are places where it's possible find modified versions of CRT GEOM and LOTTES CRT that are buggy.

Author:  rodridie [ 06/11/2015, 15:42 ]
Post subject:  Re: OpenGL GLSL shaders

Thank Mamesick, now it's all perfect! :P

Author:  rodridie [ 16/01/2016, 5:41 ]
Post subject:  Re: OpenGL GLSL shaders

Mamesick, it is possible to remove these artifacts (effects) that are on the lines of scanlines? Thank you!

Attachments:
crt-geom.jpg
crt-geom.jpg [ 336.43 KiB | Viewed 9743 times ]

Author:  mamesick [ 19/01/2016, 9:41 ]
Post subject:  Re: OpenGL GLSL shaders

I guess no. I don't know what should be changed in the shader. Really. Sorry.

Author:  Pulky [ 27/01/2016, 9:43 ]
Post subject:  Re: OpenGL GLSL shaders

Hi Mamesick how I can disabled curvature ??? :oops:

Author:  mamesick [ 27/01/2016, 11:06 ]
Post subject:  Re: OpenGL GLSL shaders

Pulky wrote:
Hi Mamesick how I can disabled curvature ??? :oops:


Open with a text editor the .fsh file related to shader you are using and find this line:
Code:
// Enable screen curvature.
#define CURVATURE // comment out this line, if you dont want curvature and if you want a FLAT CRT.
the c
Simply put two // in front of the #define statement. Save the changes and verify you have now a FLAT display

Page 1 of 2 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/