Comment

Comment by Tehdasi

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.

parent Tehdasi 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton