How to scanline shader (fix resolution)

Hi, greetings

First sorry my english

Im looking for a shader (or ideas how to make if dont exist) that generate simple scanlines (like interlacing.cg) but instead of just set the brightness for the scanline, that check the pixels, and if is under a value, make dark, over a value, dont touch

For example, in a scanline, check all pixels, if is dark color, make this pixel black, but if found a white pixel, or very close to white, dont do anything

My idea, is to make a selective scanline, only for dark pixels

A normal 50% scanline for example (a png), convert all white pixels in gray, that is i want to avoid

This for a 640x480 resolution, or better, 1280x480

Any ideas? thanks

I actually already made one that does something similar. It’s misc/interlacing-phosphor.cg. If you disable the phosphor stuff in the parameters, you’re left with just the scanline effect, which varies with the brightness of the surrounding pixels:

Thats what i was looking for, i already change some parameters, and work great for me

thanks a lot, and great work!