Skip to content

Commit

Permalink
Fixed particle rendering bug where variation only applied if size var…
Browse files Browse the repository at this point in the history
…ied.
  • Loading branch information
MStachowicz committed Aug 17, 2024
1 parent 009814d commit 4b019b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/OpenGL/GLSL/particle.geom
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ void main()
{
if (gl_in[0].gl_Position.w > 0.0) // w component is lifetime
{
#ifdef HAS_VARYING
geom_out.lifetime_factor = vert_out[0].lifetime_factor;
#endif

#ifdef FIXED_SIZE
float size = size;
#elifdef VARYING_SIZE
geom_out.lifetime_factor = vert_out[0].lifetime_factor;
float size = mix(start_size, end_size, vert_out[0].lifetime_factor);
#endif

Expand Down

0 comments on commit 4b019b7

Please sign in to comment.