A custom shader that cutout praticular color?!

Hi,
I want to write a shader that take red color form texture and cut it out and blue parts remains finally!
156138-untitled-1.png

I think what you’ll be looking for is a image effect shader that runs in post processing. The simplest way to do this would be to call Blit()inside OnRenderImage(). OnRenderImage has two parameters, source and destination. You want to call Blit(source, destination, yourMaterial, 0) where yourMaterial is a material with the image effect shader.


For that image effect you would just compare the previous pixels color to ‘red’ or a color of your choosing. If its exactly the same or close enough, you change it.