Skip to content

Commit

Permalink
- Fixed particles in softpoly.
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Jan 7, 2017
1 parent 5d7f18b commit a57ebbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/r_poly_particle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ void RenderPolyParticle::Render(const TriMatrix &worldToClip, const Vec4f &clipP

if (swrenderer::r_swtruecolor)
{
uint32_t alpha = particle->alpha;
uint32_t alpha = (uint32_t)(particle->alpha * 255 + 0.5);
args.uniforms.color = (alpha << 24) | (particle->color & 0xffffff);
}
else
{
args.uniforms.color = ((uint32_t)particle->color) >> 24;
args.uniforms.srcalpha = particle->alpha;
args.uniforms.destalpha = 255 - particle->alpha;
args.uniforms.srcalpha = (uint32_t)(particle->alpha * 255 + 0.5);
args.uniforms.destalpha = 255 - (uint32_t)(particle->alpha * 255 + 0.5);
}

args.objectToClip = &worldToClip;
Expand Down

0 comments on commit a57ebbd

Please sign in to comment.