You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -540,6 +540,11 @@ class Drawable : public Thing,
540
540
inline Real getEffectiveOpacity() const { return m_explicitOpacity * m_effectiveStealthOpacity; } ///< get alpha/opacity value used to override defaults when drawing.
541
541
voidsetEffectiveOpacity( Real pulseFactor, Real explicitOpacity = -1.0f );
542
542
543
+
// AW: new params for additive transparency scaling (=emissive)
inline Real getEmissiveOpacity() const { if (m_isEmissiveOpacityScaling) returngetEffectiveOpacity(); elsereturn1.0; }
547
+
543
548
// this is for the add'l pass fx which operates completely independently of the stealth opacity effects. Draw() does the fading every frame.
544
549
inline Real getSecondMaterialPassOpacity() const { return m_secondMaterialPassOpacity; } ///< get alpha/opacity value used to render add'l rendering pass.
545
550
voidsetSecondMaterialPassOpacity( Real op ) { m_secondMaterialPassOpacity = op; }; ///< set alpha/opacity value used to render add'l rendering pass.
@@ -663,6 +668,8 @@ class Drawable : public Thing,
663
668
Real m_stealthOpacity; ///< <<minimum>> opacity due to stealth. pulse is between opaque and this
664
669
Real m_effectiveStealthOpacity; ///< opacity actually used to render with, after the pulse and stuff.
665
670
671
+
Bool m_isEmissiveOpacityScaling; ///< should emissive color be scaled with opacity (needed for fading out additive objects)
0 commit comments