5 ms·
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 sim
by Tehdasi 3y 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.