Live data from Hacker News

Rendering Worlds with Two Triangles on the GPU [pdf]

iquilezles.org

11–20 of 26 posts

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

#12
post #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.

That is incorrect. You can cover the screen with a single triangle ... just make it big enough. The corners get clipped and the middle region of the big triangle will cover the screen.

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

#13
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?

Well, for very small intros (4k/8k) distance fields are still hard to beat due to their compactness. A couple of examples not based on distfields, off the top of my head:

http://www.pouet.net/prod.php?which=62027 (No idea what this is, but it's great)

http://www.pouet.net/prod.php?which=62974 (reverse fluid simulation)

http://www.pouet.net/prod.php?which=59613 (particles)

For 64k intros and size unlimited demos the possibilities are too many to list. Procedural mesh generation is a classic approach which has found great modern use recently:

http://www.pouet.net/prod.php?which=61204 (if you follow 1 link in this comment make it this one)

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

#14
post #9

Earlier quoted context omitted.

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.

That is incorrect. You can cover the screen with a single triangle ... just make it big enough. The corners get clipped and the middle region of the big triangle will cover the screen.

You can get around the clipping problem by displaying it on an old Interocitor.

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

#16
post #9

Earlier quoted context omitted.

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.

That is incorrect. You can cover the screen with a single triangle ... just make it big enough. The corners get clipped and the middle region of the big triangle will cover the screen.

True, both approaches are equally valid and being used. Every once in a while some gfx haxors also spend baffling amounts of effort on humorously "benchmarking" both approaches against each other.. ;)

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

#18
I think the most elegant thing about this method is that it describes a scene in terms of its basic mathematical 3D objects and transformations on them (list here: http://www.iquilezles.org/www/articles/distfunctions/distfun... ) and then exploits the massive parallelism of the GPU for rendering all the pixels.

Here's a demo of someone playing around with it, complete with a Slisesix-inspired scene: http://www.rpenalva.com/blog/?p=254

This set of slides is also related: http://www.iquilezles.org/www/material/function2009/function...

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

#19
Is the demoscene a good place to get into graphics programming? The prevalence of older methods leads me to believe one could learn in a similar progression to the graphics gurus of today, moving from simpler old methods with performance and size optimization to modern techniques?

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

#20
post #11

And if you want to try things out yourself, iq has created a playground for you here: https://www.shadertoy.com/

and one similar to Elevated https://www.shadertoy.com/view/4slGD4

It is disingenuous for the author to not cite Elevated.
Post reply on HN