mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 06:22:07 +00:00
Remove mLightParms
This commit is contained in:
parent
f80807d26a
commit
59c72e98a4
2 changed files with 11 additions and 14 deletions
|
@ -235,7 +235,6 @@ protected:
|
|||
int mTextureModeFlags;
|
||||
int mSoftLight;
|
||||
int mLightMode = -1;
|
||||
float mLightParms[4];
|
||||
|
||||
float mAlphaThreshold;
|
||||
float mClipSplit[2];
|
||||
|
@ -287,8 +286,10 @@ public:
|
|||
mStreamData.uTextureAddColor = 0;
|
||||
mStreamData.uTextureModulateColor = 0;
|
||||
mSoftLight = 0;
|
||||
mLightParms[0] = mLightParms[1] = mLightParms[2] = 0.0f;
|
||||
mLightParms[3] = -1.f;
|
||||
mStreamData.uLightDist = 0.0f;
|
||||
mStreamData.uLightFactor = 0.0f;
|
||||
mStreamData.uFogDensity = 0.0f;
|
||||
mStreamData.uLightLevel = -1.0f;
|
||||
mSpecialEffect = EFF_NONE;
|
||||
mLightIndex = -1;
|
||||
mBoneIndexBase = -1;
|
||||
|
@ -463,13 +464,13 @@ public:
|
|||
|
||||
void SetSoftLightLevel(int llevel, int blendfactor = 0)
|
||||
{
|
||||
if (blendfactor == 0) mLightParms[3] = llevel / 255.f;
|
||||
else mLightParms[3] = -1.f;
|
||||
if (blendfactor == 0) mStreamData.uLightLevel = llevel / 255.f;
|
||||
else mStreamData.uLightLevel = -1.f;
|
||||
}
|
||||
|
||||
void SetNoSoftLightLevel()
|
||||
{
|
||||
mLightParms[3] = -1.f;
|
||||
mStreamData.uLightLevel = -1.f;
|
||||
}
|
||||
|
||||
void SetLightMode(int lightmode)
|
||||
|
@ -562,13 +563,13 @@ public:
|
|||
const float LOG2E = 1.442692f; // = 1/log(2)
|
||||
mFogColor = c;
|
||||
mStreamData.uFogColor = mFogColor;
|
||||
if (d >= 0.0f) mLightParms[2] = d * (-LOG2E / 64000.f);
|
||||
if (d >= 0.0f) mStreamData.uFogDensity = d * (-LOG2E / 64000.f);
|
||||
}
|
||||
|
||||
void SetLightParms(float f, float d)
|
||||
{
|
||||
mLightParms[1] = f;
|
||||
mLightParms[0] = d;
|
||||
mStreamData.uLightFactor = f;
|
||||
mStreamData.uLightDist = d;
|
||||
}
|
||||
|
||||
PalEntry GetFogColor() const
|
||||
|
|
|
@ -278,7 +278,7 @@ void VkRenderState::ApplyRenderPass(int dt)
|
|||
pipelineKey.ShaderKey.SWLightRadial = (gl_fogmode == 2);
|
||||
pipelineKey.ShaderKey.SWLightBanded = false; // gl_bandedswlight;
|
||||
|
||||
float lightlevel = mLightParms[3];
|
||||
float lightlevel = mStreamData.uLightLevel;
|
||||
if (lightlevel < 0.0)
|
||||
{
|
||||
pipelineKey.ShaderKey.LightMode = 0; // Default
|
||||
|
@ -395,10 +395,6 @@ void VkRenderState::ApplyStreamData()
|
|||
else
|
||||
mStreamData.timer = 0.0f;
|
||||
|
||||
mStreamData.uLightDist = mLightParms[0];
|
||||
mStreamData.uLightFactor = mLightParms[1];
|
||||
mStreamData.uFogDensity = mLightParms[2];
|
||||
mStreamData.uLightLevel = mLightParms[3];
|
||||
mStreamData.uAlphaThreshold = mAlphaThreshold;
|
||||
mStreamData.uClipSplit = { mClipSplit[0], mClipSplit[1] };
|
||||
|
||||
|
|
Loading…
Reference in a new issue