mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- fixed overflow with storing a sprite's dynamic light color in a PalEntry.
This commit is contained in:
parent
9a6bc64381
commit
92185f96eb
3 changed files with 4 additions and 9 deletions
|
@ -141,7 +141,7 @@ bool FRenderState::ApplyShader()
|
|||
activeShader->muLightParms.Set(mLightParms);
|
||||
activeShader->muFogColor.Set(mFogColor);
|
||||
activeShader->muObjectColor.Set(mObjectColor);
|
||||
activeShader->muDynLightColor.Set(mDynColor);
|
||||
activeShader->muDynLightColor.Set(mDynColor.vec);
|
||||
activeShader->muInterpolationFactor.Set(mInterpolationFactor);
|
||||
|
||||
if (mGlowEnabled)
|
||||
|
|
|
@ -65,7 +65,7 @@ class FRenderState
|
|||
FStateVec4 mGlowTopPlane, mGlowBottomPlane;
|
||||
PalEntry mFogColor;
|
||||
PalEntry mObjectColor;
|
||||
PalEntry mDynColor;
|
||||
FStateVec4 mDynColor;
|
||||
|
||||
int mEffectState;
|
||||
int mColormapState;
|
||||
|
@ -184,12 +184,7 @@ public:
|
|||
|
||||
void SetDynLight(float r, float g, float b)
|
||||
{
|
||||
mDynColor = PalEntry(255, xs_CRoundToInt(r*255), xs_CRoundToInt(g*255), xs_CRoundToInt(b*255));
|
||||
}
|
||||
|
||||
void SetDynLight(PalEntry pe)
|
||||
{
|
||||
mDynColor = pe;
|
||||
mDynColor.Set(r, g, b, 0);
|
||||
}
|
||||
|
||||
void SetObjectColor(PalEntry pe)
|
||||
|
|
|
@ -186,7 +186,7 @@ class FShader
|
|||
FUniform4f muColormapRange;
|
||||
FBufferedUniform4i muLightRange;
|
||||
FBufferedUniformPE muFogColor;
|
||||
FBufferedUniformPE muDynLightColor;
|
||||
FBufferedUniform4f muDynLightColor;
|
||||
FBufferedUniformPE muObjectColor;
|
||||
FUniform4f muGlowBottomColor;
|
||||
FUniform4f muGlowTopColor;
|
||||
|
|
Loading…
Reference in a new issue