Live data from Hacker News

Rendering Worlds with Two Triangles on the GPU [pdf]

iquilezles.org

1–10 of 26 posts

Re: Rendering Worlds with Two Triangles on the GPU [pdf]

#5
post #3

Ah, the classic presentation that got me started in the demoscene a couple of years back. The Google cache version of the pdf doesn't include any images, so I put up a copy over here: https://dl.dropboxusercontent.com/u/2173295/rwwtt.pdf

Thanks for the mirror.

Know of any novel techniques/rehashing of old techniques that have been developed since?

Re: Rendering Worlds with Two Triangles on the GPU [pdf]

#6
This is a really impressive presentation -- after looking on from afar at the seemingly magical works of the demoscene, this finally helped me understand a little bit of how the magic happens. I've only got a bit of GLSL experience so far but now I want to learn a lot more.

Re: Rendering Worlds with Two Triangles on the GPU [pdf]

#7
post #2

You can download it from here http://www.pouet.net/prod.php?which=51074 It's been updated to run more reliably (edit: on Vista) but I can't find a version that will run on Win7. Edit: I found a similar one on Shadertoy https://www.shadertoy.com/view/lsf3zr

i just ran it on my mac successfully with wine..!

Re: Rendering Worlds with Two Triangles on the GPU [pdf]

#9

Could someone explain to me what the "two triangles that cover the entire screen area" have to do with anything?

It basically means everything is happening in the shaders, not in geometry. There has to be some vertexes though, and the minimum you can have to cover the screen is two triangles.

Re: Rendering Worlds with Two Triangles on the GPU [pdf]

#10

Could someone explain to me what the "two triangles that cover the entire screen area" have to do with anything?

Two triangles make a flat screen (a 'quad'), which is sized to fill your actual screen. When you run a pixel shader over the quad, it ends up running for every pixel on your screen. The result is you have the visual effect of the pixel shader giving a very detailed-looking scene, when the actual geometry is as simple as it gets.

Here's an old experiment I did where the pixel shader is running on the faces of a cube http://dgholz.github.io/GLSLSphere/ The cube edges are highlighted in red so you can see them. I like green.

Post reply on HN