Render scene with indexed textures for vid_rendermode 2
This commit is contained in:
parent
783a3524ed
commit
990ce7c6c9
28 changed files with 380 additions and 127 deletions
|
|
@ -343,6 +343,8 @@ void VkRenderState::ApplyRenderPass(int dt)
|
|||
pipelineKey.ShaderKey.LightBlendMode = (level.info ? static_cast<int>(level.info->lightblendmode) : 0);
|
||||
pipelineKey.ShaderKey.LightAttenuationMode = (level.info ? static_cast<int>(level.info->lightattenuationmode) : 0);
|
||||
|
||||
pipelineKey.ShaderKey.PaletteMode = mPaletteMode;
|
||||
|
||||
// Is this the one we already have?
|
||||
bool inRenderPass = mCommandBuffer;
|
||||
bool changingPipeline = (!inRenderPass) || (pipelineKey != mPipelineKey);
|
||||
|
|
@ -441,6 +443,21 @@ void VkRenderState::ApplySurfaceUniforms()
|
|||
else
|
||||
mSurfaceUniforms.timer = 0.0f;
|
||||
|
||||
if (mMaterial.mPaletteMode != mPaletteMode)
|
||||
{
|
||||
mMaterial.mPaletteMode = mPaletteMode;
|
||||
mMaterial.mChanged = true;
|
||||
}
|
||||
|
||||
if (mPaletteMode && mSWColormap)
|
||||
{
|
||||
mSurfaceUniforms.uColormapIndex = fb->GetDescriptorSetManager()->GetSWColormapTextureIndex(mSWColormap);
|
||||
}
|
||||
else
|
||||
{
|
||||
mSurfaceUniforms.uColormapIndex = 0;
|
||||
}
|
||||
|
||||
if (mMaterial.mChanged)
|
||||
{
|
||||
if (mMaterial.mMaterial)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue