Using Frame buffer objects, you can render to a texture.
You need to accumulate changes on a texture you have 2 options:
If you need to sample fallen snow to compute resulting snow layer,you may use two textures and do what's called ping pong rendering
If you simply want's to accumulate snow without sampling already fallen pixels, you could omit glClear in your fbo rendering loop and use that texture as an accumulation buffer (link).
For doing ping-pong rendering, the steps are:
- create two similar textures one source, on destination, swapped each frame.
- the two are bond to the fbo as two color attachments, switching between them is done by a call to glDrawBuffers with destination colorAtachnmentX passed as argument.
- you bind your source texture as uniform to your shader
- render to fbo
- use destination texture in your scene as accumulated snow.
- swap dest and source texture for the new run.
To know if snowflake has hit the ground, you could supply falling snowflakes as a texture too with snow particle variables in place of color data... then knowing if snowflakes has hit the ground is tested against fragment world pos, but we're entering simulation world there...