mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
should use set_color_scale(), not set_color(), to fade out geom particles
This commit is contained in:
parent
f6556fec72
commit
52615b0da5
@ -20,7 +20,7 @@
|
|||||||
#include "baseParticle.h"
|
#include "baseParticle.h"
|
||||||
|
|
||||||
#include "transformState.h"
|
#include "transformState.h"
|
||||||
#include "colorAttrib.h"
|
#include "colorScaleAttrib.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function : GeomParticleRenderer
|
// Function : GeomParticleRenderer
|
||||||
@ -194,7 +194,7 @@ render(pvector< PT(PhysicsObject) >& po_vector, int ttl_particles) {
|
|||||||
alpha_scalar *= get_user_alpha();
|
alpha_scalar *= get_user_alpha();
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_node->set_attrib(ColorAttrib::make_flat
|
cur_node->set_attrib(ColorScaleAttrib::make
|
||||||
(Colorf(1.0f, 1.0f, 1.0f, alpha_scalar)));
|
(Colorf(1.0f, 1.0f, 1.0f, alpha_scalar)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user