News for hackers. Stuff that matters.
Re:Space Invaders from Scratch by zorkw4rg on Monday May 28, 2018 @07:11AM (#17171805)
now that unreadable shader trick might be neat and all, but since GLSL supports if statements why not use this and make it readable? There certainly won't be any performance issues with rendering a single triangle, but I suppose people want to feel clever?

https://rauwendaal.net/2014/06/14/rendering-a-screen-coverin...

Re:Space Invaders from Scratch by Grieverheart on Monday May 28, 2018 @02:04PM (#17173829)
Hi zorkw4rg. Thanks for having a look at the tutorials. What makes the vertex shader not readable in your opinion? If you substitute the different values gl_VertexID can take (0,1,2), it's not hard to calculate the values of gl_Position.
Re:Space Invaders from Scratch by zorkw4rg on Friday June 01, 2018 @04:28PM (#17209863)
Its certainly not hard to calculate but a if this index then this vertex coordinates, and so on, seems significantly simpler than having to calculate anything at all? It sure what be more verbose though.