diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp index cf86049247..64647b6700 100644 --- a/src/gl/renderer/gl_renderstate.cpp +++ b/src/gl/renderer/gl_renderstate.cpp @@ -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) diff --git a/src/gl/renderer/gl_renderstate.h b/src/gl/renderer/gl_renderstate.h index 1bfaf71357..f569c3eab5 100644 --- a/src/gl/renderer/gl_renderstate.h +++ b/src/gl/renderer/gl_renderstate.h @@ -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) diff --git a/src/gl/shaders/gl_shader.h b/src/gl/shaders/gl_shader.h index b079e74c46..833f97fbb3 100644 --- a/src/gl/shaders/gl_shader.h +++ b/src/gl/shaders/gl_shader.h @@ -186,7 +186,7 @@ class FShader FUniform4f muColormapRange; FBufferedUniform4i muLightRange; FBufferedUniformPE muFogColor; - FBufferedUniformPE muDynLightColor; + FBufferedUniform4f muDynLightColor; FBufferedUniformPE muObjectColor; FUniform4f muGlowBottomColor; FUniform4f muGlowTopColor;