From a57ebbd277163fef24c3fda7bf54d27f7a04a049 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sat, 7 Jan 2017 11:18:49 -0500 Subject: [PATCH] - Fixed particles in softpoly. --- src/r_poly_particle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_poly_particle.cpp b/src/r_poly_particle.cpp index 392080a848..966111aa75 100644 --- a/src/r_poly_particle.cpp +++ b/src/r_poly_particle.cpp @@ -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;