Hacker News new | ask | show | jobs
by Tehdasi 1058 days ago
Basically, yes. A shader is basically a function which passes in the x,y coords and spits out a color, and this is done for every pixel on the screen.

So a simple shader would be something like (in pseudo code):

function shader( x, y ) { if( x > 0.5 ) return white; else return black; }

would color one half of the screen black, and the other white.