CElementGen: Don't use redToAlpha pipelines without a texture

Fixes Thermal Visor crashes for Super Missile & Elite Pirate grenades
This commit is contained in:
Luke Street 2020-09-18 02:43:55 -04:00
parent a19ff62aa4
commit ee2e75b861
1 changed files with 3 additions and 2 deletions

View File

@ -1254,12 +1254,13 @@ void CElementGen::RenderParticles() {
moveRedToAlphaBuffer = true;
if (g_subtractBlend) {
if (moveRedToAlphaBuffer)
// FIXME should there be NoTex specializations for RedToAlpha?
if (moveRedToAlphaBuffer && desc->x54_x40_TEXR)
CGraphics::SetShaderDataBinding(m_redToAlphaSubDataBind[g_Renderer->IsThermalVisorHotPass()]);
else
CGraphics::SetShaderDataBinding(m_normalSubDataBind[g_Renderer->IsThermalVisorHotPass()]);
} else {
if (moveRedToAlphaBuffer)
if (moveRedToAlphaBuffer && desc->x54_x40_TEXR)
CGraphics::SetShaderDataBinding(m_redToAlphaDataBind[g_Renderer->IsThermalVisorHotPass()]);
else
CGraphics::SetShaderDataBinding(m_normalDataBind[g_Renderer->IsThermalVisorHotPass()]);