mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fix shader timer not always being applied correctly
This commit is contained in:
parent
47f056e882
commit
47fa7dafe3
2 changed files with 4 additions and 6 deletions
|
@ -325,7 +325,10 @@ void VkRenderState::ApplyStreamData()
|
|||
mStreamData.uVertexColor = mColor.vec;
|
||||
mStreamData.uVertexNormal = mNormal.vec;
|
||||
|
||||
mStreamData.timer = static_cast<float>((double)(screen->FrameTime - firstFrame) * (double)mShaderTimer / 1000.);
|
||||
if (mMaterial.mMaterial && mMaterial.mMaterial->tex)
|
||||
mStreamData.timer = static_cast<float>((double)(screen->FrameTime - firstFrame) * (double)mMaterial.mMaterial->tex->shaderspeed / 1000.);
|
||||
else
|
||||
mStreamData.timer = 0.0f;
|
||||
|
||||
if (mGlowEnabled)
|
||||
{
|
||||
|
@ -507,9 +510,6 @@ void VkRenderState::ApplyMaterial()
|
|||
mCommandBuffer->bindDescriptorSet(VK_PIPELINE_BIND_POINT_GRAPHICS, passManager->GetPipelineLayout(mRenderPassKey.NumTextureLayers), 1, base->GetDescriptorSet(mMaterial));
|
||||
}
|
||||
|
||||
if (mMaterial.mMaterial && mMaterial.mMaterial->tex)
|
||||
mShaderTimer = mMaterial.mMaterial->tex->shaderspeed;
|
||||
|
||||
mMaterial.mChanged = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,8 +87,6 @@ protected:
|
|||
int mColorMask = 15;
|
||||
int mCullMode = 0;
|
||||
|
||||
float mShaderTimer = 0.0f;
|
||||
|
||||
MatricesUBO mMatrices = {};
|
||||
StreamData mStreamData = {};
|
||||
PushConstants mPushConstants = {};
|
||||
|
|
Loading…
Reference in a new issue