Fix misc bugs in the fogball implementation - it works now

This commit is contained in:
Magnus Norddahl 2023-09-17 14:59:24 +02:00
commit a76dfafbaa
8 changed files with 32 additions and 12 deletions

View file

@ -502,7 +502,7 @@ void VkRenderState::ApplyBufferSets()
uint32_t matrixOffset = mRSBuffers->MatrixBuffer->Offset();
uint32_t streamDataOffset = mRSBuffers->StreamBuffer->Offset();
uint32_t lightsOffset = mLightIndex >= 0 ? (uint32_t)(mLightIndex / MAX_LIGHT_DATA) * sizeof(LightBufferUBO) : mLastLightsOffset;
uint32_t fogballsOffset = mFogballIndex >= 0 ? (uint32_t)(mFogballIndex / MAX_FOGBALL_DATA) * sizeof(Fogball) : mLastFogballsOffset;
uint32_t fogballsOffset = mFogballIndex >= 0 ? (uint32_t)(mFogballIndex / MAX_FOGBALL_DATA) * sizeof(FogballBufferUBO) : mLastFogballsOffset;
if (mViewpointOffset != mLastViewpointOffset || matrixOffset != mLastMatricesOffset || streamDataOffset != mLastStreamDataOffset || lightsOffset != mLastLightsOffset || fogballsOffset != mLastFogballsOffset)
{
auto descriptors = fb->GetDescriptorSetManager();