|
Shader Floor
#333257 - 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!
|
|
|
|
Re: Shader Floor
[Re: lamprey]
#333270 - 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. ![](//www.mameworld.info/ubbthreads/images/graemlins/frown.gif)
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)
|
|
|
|
Re: Shader Floor
[Re: SoltanGris42]
#333273 - 10/16/14 04:29 AM
|
|
|
> 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.
LOL, I was just about to reply saying that. ![](//www.mameworld.info/ubbthreads/images/graemlins/smile.gif)
Yeah, the gammaBoost did have three numbers of the same value (1.0), I was trying to give a slight boost the blue.
|
|
|
|