Skip to content

Commit

Permalink
ParticleSystem - Minor cleanup to shader based on technical editor fe…
Browse files Browse the repository at this point in the history
…edback
  • Loading branch information
danginsburg committed Nov 9, 2013
1 parent 5119eb8 commit b697885
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Chapter_14/ParticleSystem/ParticleSystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ int Init ( ESContext *esContext )
" gl_Position.w = 1.0; \n"
" } \n"
" else \n"
" { \n"
" gl_Position = vec4( -1000, -1000, 0, 0 ); \n"
" } \n"
" v_lifetime = 1.0 - ( u_time / a_lifetime ); \n"
" v_lifetime = clamp ( v_lifetime, 0.0, 1.0 ); \n"
" gl_PointSize = ( v_lifetime * v_lifetime ) * 40.0; \n"
Expand Down

0 comments on commit b697885

Please sign in to comment.