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

lamprey
MAME Fan
Reged: 12/01/11
Posts: 238
Send PM
Shader Floor
10/15/14 11:10 PM


Hi,

Now that 0155 is out, I wanted to play with the SDL shader a bit more and was wondering if someone might be able to help me or point me in the right direction. When using HLSL on my cabinet, I wanted to boost the floor a bit so that the screen stands out from the artwork (meaning black isn't totally black). I realize that probably goes against the grain since CRTs tend to have nice blacks. That having been said, it's something I want to do to help with the illusion of a CRT in the middle of a virtual cabinet.

Using HLSL I just set bump up floor a little to something like:
Code:

floor 0.05,0.05,0.05


However using a shader (Timothy Lottes as moded by SoltanGris42) I only seem to be successful in bosting the overall gamma, which I'm trying to avoid. What I initial did was to adjust the "gammaBoost":
Code:

const vec3 gammaBoost = vec3(1.0/1.15, 1.0/1.15, 1.0/1.3);


Which is used in the gama boot section:
Code:

#ifdef GAMMA_CONTRAST_BOOST
gl_FragColor.rgb=brightMult*pow(gl_FragColor.rgb,gammaBoost )-vec3(blackClip);
#endif
gl_FragColor=vec4(clamp(ToSrgb(gl_FragColor.rgb),0.0,1.0) , 1.0);


I see why this doesn't do what I want since it affecting overall gamma. Is there an (easy) way to just boost the floor a bit and not the entire gamma?

Thanks!







Entire thread
Subject Posted by Posted on
* Shader Floor lamprey 10/15/14 11:10 PM
. * Re: Shader Floor SoltanGris42  10/16/14 04:18 AM
. * Re: Shader Floor lamprey  10/16/14 04:29 AM

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