diff --git a/src/hwrenderer/scene/hw_sprites.cpp b/src/hwrenderer/scene/hw_sprites.cpp index 94e86beb4..fe7a0aa36 100644 --- a/src/hwrenderer/scene/hw_sprites.cpp +++ b/src/hwrenderer/scene/hw_sprites.cpp @@ -94,7 +94,7 @@ void GLSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent) gl_usecolorblending && !di->isFullbrightScene() && actor && fullbright && gltexture && !gltexture->tex->GetTranslucency()) { - RenderStyle = LegacyRenderStyles[STYLE_ColorBlend]; + RenderStyle = LegacyRenderStyles[STYLE_ColorAdd]; } state.SetRenderStyle(RenderStyle); diff --git a/src/namedef.h b/src/namedef.h index 184c58fd0..c2f4cd3f5 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -46,6 +46,9 @@ xx(Shadow) xx(Subtract) xx(Subtractive) xx(FillColor) +xx(ColorBlend) +xx(ColorAdd) +xx(Multiply) // Healingradius types xx(Mana) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index a02ea4064..0999e71eb 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -8602,7 +8602,7 @@ void PrintMiscActorInfo(AActor *query) /*for (flagi = 0; flagi < 31; flagi++) if (query->BounceFlags & 1<Alpha, query->renderflags.GetValue()); /*for (flagi = 0; flagi < 31; flagi++) if (query->renderflags & 1<RenderStyle = STYLE_Subtract; break; + case NAME_ColorBlend: + th->RenderStyle = STYLE_ColorBlend; + break; + case NAME_ColorAdd: + th->RenderStyle = STYLE_ColorAdd; + break; + case NAME_Multiply: + th->RenderStyle = STYLE_Multiply; + break; default: break; } diff --git a/src/r_data/renderstyle.cpp b/src/r_data/renderstyle.cpp index 2ce22d19c..80bc00539 100644 --- a/src/r_data/renderstyle.cpp +++ b/src/r_data/renderstyle.cpp @@ -62,6 +62,7 @@ FRenderStyle LegacyRenderStyles[STYLE_Count] = { { STYLEOP_Add, STYLEALPHA_InvDstCol, STYLEALPHA_Zero, 0 } }, /* STYLE_InverseMultiply */ { { STYLEOP_Add, STYLEALPHA_SrcCol, STYLEALPHA_InvSrcCol, 0 } }, /* STYLE_ColorBlend */ { { STYLEOP_Add, STYLEALPHA_One, STYLEALPHA_Zero, 0 } }, /* STYLE_Source */ + { { STYLEOP_Add, STYLEALPHA_SrcCol, STYLEALPHA_One, 0 } }, /* STYLE_ColorAdd */ }; double GetAlpha(int type, double alpha) diff --git a/src/r_data/renderstyle.h b/src/r_data/renderstyle.h index 8bedb4cc5..64326fd3c 100644 --- a/src/r_data/renderstyle.h +++ b/src/r_data/renderstyle.h @@ -78,6 +78,7 @@ enum ERenderStyle STYLE_InverseMultiply, // Multiply source with inverse of destination (HW renderer only.) STYLE_ColorBlend, // Use color intensity as transparency factor STYLE_Source, // No blending (only used internally) + STYLE_ColorAdd, // Use color intensity as transparency factor and blend additively. STYLE_Count }; diff --git a/src/scripting/thingdef_properties.cpp b/src/scripting/thingdef_properties.cpp index 522a569ee..00864f4f1 100644 --- a/src/scripting/thingdef_properties.cpp +++ b/src/scripting/thingdef_properties.cpp @@ -700,12 +700,14 @@ DEFINE_PROPERTY(renderstyle, S, Actor) PROP_STRING_PARM(str, 0); static const char * renderstyles[]={ "NONE", "NORMAL", "FUZZY", "SOULTRANS", "OPTFUZZY", "STENCIL", - "TRANSLUCENT", "ADD", "SHADED", "SHADOW", "SUBTRACT", "ADDSTENCIL", "ADDSHADED", NULL }; + "TRANSLUCENT", "ADD", "SHADED", "SHADOW", "SUBTRACT", "ADDSTENCIL", + "ADDSHADED", "COLORBLEND", "COLORADD", "MULTIPLY", NULL }; static const int renderstyle_values[]={ STYLE_None, STYLE_Normal, STYLE_Fuzzy, STYLE_SoulTrans, STYLE_OptFuzzy, STYLE_TranslucentStencil, STYLE_Translucent, STYLE_Add, STYLE_Shaded, - STYLE_Shadow, STYLE_Subtract, STYLE_AddStencil, STYLE_AddShaded}; + STYLE_Shadow, STYLE_Subtract, STYLE_AddStencil, STYLE_AddShaded, + STYLE_ColorBlend, STYLE_ColorAdd, STYLE_Multiply}; // make this work for old style decorations, too. if (!strnicmp(str, "style_", 6)) str+=6;