unify layouts (and move in/out variables to c++) in preparation for gpu sprite traces

This commit is contained in:
Ricardo Luís Vaz Silva 2025-01-13 21:02:33 -03:00 committed by Magnus Norddahl
commit 998fdec6e8
6 changed files with 176 additions and 102 deletions

View file

@ -264,6 +264,7 @@ void VkRenderState::ApplyRenderPass(int dt)
{
pipelineKey.ShaderKey.SpecialEffect = mSpecialEffect;
pipelineKey.ShaderKey.EffectState = 0;
pipelineKey.ShaderKey.Simple = (mSpecialEffect == EFF_BURN || mSpecialEffect == EFF_STENCIL || mSpecialEffect == EFF_PORTAL);
pipelineKey.ShaderKey.AlphaTest = false;
}
else
@ -274,6 +275,9 @@ void VkRenderState::ApplyRenderPass(int dt)
if (r_skipmats && pipelineKey.ShaderKey.EffectState >= 3 && pipelineKey.ShaderKey.EffectState <= 4)
pipelineKey.ShaderKey.EffectState = 0;
pipelineKey.ShaderKey.AlphaTest = mSurfaceUniforms.uAlphaThreshold >= 0.f;
pipelineKey.ShaderKey.Simple = mWireframe;
pipelineKey.ShaderKey.Simple3D = mWireframe; // simple notexture drawing for wireframe
}
int uTextureMode = GetTextureModeAndFlags((mMaterial.mMaterial && mMaterial.mMaterial->Source()->isHardwareCanvas()) ? TM_OPAQUE : TM_NORMAL);
@ -283,8 +287,6 @@ void VkRenderState::ApplyRenderPass(int dt)
pipelineKey.ShaderKey.Detailmap = (uTextureMode & TEXF_Detailmap) != 0;
pipelineKey.ShaderKey.Glowmap = (uTextureMode & TEXF_Glowmap) != 0;
pipelineKey.ShaderKey.Simple3D = mWireframe; // simple notexture drawing for wireframe
pipelineKey.ShaderKey.DepthFadeThreshold = mSurfaceUniforms.uDepthFadeThreshold > 0.0f;
// The way GZDoom handles state is just plain insanity!