diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp index 746bbb176..4668bf2b7 100644 --- a/src/gl/renderer/gl_renderstate.cpp +++ b/src/gl/renderer/gl_renderstate.cpp @@ -94,15 +94,14 @@ void FRenderState::Reset() // //========================================================================== -int FRenderState::SetupShader(bool cameratexture, int &shaderindex, float warptime) +int FRenderState::SetupShader(int &shaderindex, float warptime) { int softwarewarp = 0; - if (gl.hasGLSL()) { mEffectState = shaderindex; - mWarpTime = warptime; + if (shaderindex > 0) GLRenderer->mShaderManager->SetWarpSpeed(shaderindex, warptime); } else { diff --git a/src/gl/renderer/gl_renderstate.h b/src/gl/renderer/gl_renderstate.h index 888ead0d7..79e277948 100644 --- a/src/gl/renderer/gl_renderstate.h +++ b/src/gl/renderer/gl_renderstate.h @@ -68,7 +68,6 @@ class FRenderState int mEffectState; int mColormapState; - float mWarpTime; int glSrcBlend, glDstBlend; int glAlphaFunc; @@ -93,7 +92,7 @@ public: void Reset(); - int SetupShader(bool cameratexture, int &shaderindex, float warptime); + int SetupShader(int &shaderindex, float warptime); void Apply(bool forcenoshader = false); void SetVertexBuffer(FVertexBuffer *vb) diff --git a/src/gl/textures/gl_material.cpp b/src/gl/textures/gl_material.cpp index ce3c75181..988ac8121 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -842,7 +842,7 @@ void FMaterial::Bind(int clampmode, int translation, int overrideshader) int maxbound = 0; bool allowhires = tex->xScale == FRACUNIT && tex->yScale == FRACUNIT; - int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, tex->gl_info.shaderspeed); + int softwarewarp = gl_RenderState.SetupShader(shaderindex, tex->gl_info.shaderspeed); if (tex->bHasCanvas || tex->bWarped) clampmode = 0; else if (clampmode != -1) clampmode &= 3; @@ -889,7 +889,7 @@ void FMaterial::BindPatch(int translation, int overrideshader, bool alphatexture int shaderindex = overrideshader > 0? overrideshader : mShaderIndex; int maxbound = 0; - int softwarewarp = gl_RenderState.SetupShader(tex->bHasCanvas, shaderindex, tex->gl_info.shaderspeed); + int softwarewarp = gl_RenderState.SetupShader(shaderindex, tex->gl_info.shaderspeed); const FHardwareTexture *glpatch = mBaseLayer->BindPatch(0, translation, softwarewarp, alphatexture); // The only multitexture effect usable on sprites is the brightmap.