Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use <a href="http://www.opengl.org/registry/specs/EXT/transform_feedback.txt" rel="nofollow">transform feedback</a> to calculate the particle physics in the vertex shader and <a href="http://www.opengl.org/registry/specs/EXT/draw_instanced.txt" rel="nofollow">instancing</a> if you want to use 3D snowflakes. <a href="http://www.opengl.org/registry/specs/ARB/point_sprite.txt" rel="nofollow">Point sprites</a> should make billboards faster and use less memory for storing vertices. (You only need one per snowflake.)</p> <p>Running the particle system in the vertex shader will make it a few times faster while the math essentially stays the same.</p> <p>You could also use a 3D texture to offset the damping calculation so you can have visible turbulences.<br> If you use a heightmap for the ground, you can use that data to reset snowflakes that aren't visible anymore.</p> <p>Transform feedback and instancing are explained in <a href="http://rads.stackoverflow.com/amzn/click/0321712617" rel="nofollow">OpenGL SuperBible (Fifth Edition)</a> in chapter 12, point sprites are in chapter 7. <a href="http://www.starstonesoftware.com/OpenGL/" rel="nofollow">The source code for all examples is available online.</a> The example code for Mac OS X only goes up to chapter 7, <a href="http://www.starstonesoftware.com/OpenGL/mac.htm" rel="nofollow">but it should be possible to make most of it work.</a></p> <p>I couldn't find any good online tutorials, but the code well commented. The transform feedback example is called "flocking". For a snowflake simulation, one vertex shader should be enough for both updating and redering the particles in one pass.</p> <p>If you want lots of fast moving snow, the <a href="http://www.slideshare.net/icastano/cascades-demo-secrets" rel="nofollow">water particles from Nvidia's Cascades Demo</a> (starting at page 114) show an interesting approach to faking a large amount of particles.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload