vertexshaderart.com
category: code [glöplog]
Maybe first have a look at some basic programming courses.
(that or lay off the scotch and amphetamines)
(that or lay off the scotch and amphetamines)
visy, I really like your creations.
This seems pretty impressive to me and very demo-ish in that it's doing something I wouldn't have thought of
http://www.vertexshaderart.com/art/TdqvseMQyoJ3ZrjrD
It's doing depth of field effects with only polygons. There's no post processing.
Lots of minor touches too. 2 or 3 kinds of fireworks, shaky cam, bouncing particles, street lights and circus lights, all without state. Yea I know there's some super impressive fragment shaders but, well at least I was impressed
http://www.vertexshaderart.com/art/TdqvseMQyoJ3ZrjrD
It's doing depth of field effects with only polygons. There's no post processing.
Lots of minor touches too. 2 or 3 kinds of fireworks, shaky cam, bouncing particles, street lights and circus lights, all without state. Yea I know there's some super impressive fragment shaders but, well at least I was impressed
That fireworks shader is odd - somehow it's faster on my phone (iPhone 6s) than my desktop (Radeon M295). On the desktop it's noticeably not smooth, particularly when a firework is very close to the camera. On the phone it looks to be a steady 60fps.
Why would that be? Fill rate limited perhaps (i'm on a 5K screen so it's a lot of pixels)?
Why would that be? Fill rate limited perhaps (i'm on a 5K screen so it's a lot of pixels)?
Yes, it's a fill rate issue. Lots of overdraw of fullscreen polygons.
It's amazing how fast GPUs are and also how slow they are. Modern GPUs can do lots of operations per pixel but given them too many pixels and they go really slow still.
Want to crash your GPU? (well, give it so much work that either your OS resets it if it's a good OS or your OS crashes if it's a bad OS). Just give a lot of fullscreen polygons to draw. For example this shader
With a draw count of 1000+ will probably bring your OS to a crawl.
It's amazing how fast GPUs are and also how slow they are. Modern GPUs can do lots of operations per pixel but given them too many pixels and they go really slow still.
Want to crash your GPU? (well, give it so much work that either your OS resets it if it's a good OS or your OS crashes if it's a bad OS). Just give a lot of fullscreen polygons to draw. For example this shader
Code:
void main() {
gl_PointSize = 2000.0;
gl_Position = vec4(0,0,0,1);
}
With a draw count of 1000+ will probably bring your OS to a crawl.
Makes sense, but it's still surprising that the phone handles it at 60fps. I thought maybe it's the TBDR setup on the powervr GPU, as if there's heavy overdraw it culls well and is very efficient. But there's so much transparency there I doubt it helps.