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

SoltanGris42
MAME Fan
Reged: 11/16/13
Posts: 134
Send PM
Re: Shader Floor
10/16/14 04:18 AM


> 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: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":const vec3 gammaBoost = vec3(1.0/1.15, 1.0/1.15,
> 1.0/1.3);
> Which is used in the gama boot section:#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!

Just set "blackClip" to a negative number. You might also need to lower "brightMult" afterwards. You would need to have "GAMMA_CONTRAST_BOOST" enabled.

EDIT: This looks gross with curvature enabled though because it raises the black level of the whole rectangular tecture.

As a side note, "gammaBoost" should have the same number 3 times if you don't want the color to shift. If it wasn't originally, then that was just a mistake on my part.

Edited by SoltanGris42 (10/16/14 04:22 AM)







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 
1 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: 1424