Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main(){
- //this is the fragment shader
- //this is where the pixel level drawing happens
- //gl_FragCoord gives us the x and y of the current pixel its drawing
- //we use the mod function to only draw pixels if they are every 2 in x or every 4 in y
- if( mod(gl_FragCoord.x, 2.0) <= 0.5 && mod(gl_FragCoord.y, 4.0) <= 0.5 ){
- gl_FragColor = gl_Color;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement