Editing/Tweaking Scanline Shader

On HunterK’s blog [http://filthypants.blogspot.com/], he posted how to tweak the scanline shaders by changing 2 values i.e.

const float base_brightness = 0.95; const vec2 sine_comp = vec2(0.05, 0.15);

In the current scanline.glsl shader, these lines don’t seem like they’re part of the code…

Can someone point me in the right direction of how to tweak the current iteration of the scanline shader, such as darkening the lines, making them thicker etc…?

It seems like if I select scanline.glsl with a 1x scale, there are only vertical scanlines, no horizontal, so i’d like to mess around and see what I can come up with.

I’m used to making a .png overlay for scanlines, and I’d like to see if I can translate some of my overlays to the shader approach.

Thanks

Yeah, this is a totally different scanline shader that’s been further buggered by being programmatically converted from Cg to GLSL, so you won’t be able to learn much from its code, unfortunately.

On the bright side, you should probably be able to achieve what you’re wanting by modifying the number values in these lines (126-128):

    _a0017 = vec2( 5.00000007E-02, 1.50000006E-01)*_TMP1;
    _TMP2 = dot(_a0017, vec2( 1.00000000E+00, 1.00000000E+00));
    _scanline = _TMP0.xyz*(9.49999988E-01 + _TMP2);

If you’re just looking for a nice scanline shader, I recommend crt-caligari in the ‘crt’ directory. It handles scanlines, gamma correction, and some other CRT-type effects without the heavy resource requirements of cgwg’s CRT shader.

Thanks for the reply… The CRT-caligari has awesome gamma tweaks, but unfortunately for me, on my Nexus 7 at least, there’s no visible scanlines until I get to x3 scale, and by that time my Nexus is starting to crawl :-\

So really I guess I just want simple, horizontal, even scalines with no artifacts (like it’s that simple, right :wink: )