- major shader rework

* handle brightmaps in the main shader instead of keeping separate instances around.
* added detail and glow layers from Raze.
* fixed material setup which could not guarantee that everything was initialized correctly.
* for warped textures, warp all layers. With this brightmaps finally work on warped textures.

Note: Vulkan reports a "device lost" error with this which still needs to be investigated.
This commit is contained in:
Christoph Oelckers 2020-04-12 22:10:15 +02:00
commit 8381092cce
31 changed files with 293 additions and 134 deletions

View file

@ -372,7 +372,9 @@ void VkRenderState::ApplyPushConstants()
tempTM = TM_OPAQUE;
mPushConstants.uFogEnabled = fogset;
mPushConstants.uTextureMode = mTextureMode == TM_NORMAL && tempTM == TM_OPAQUE ? TM_OPAQUE : mTextureMode;
int f = mTextureModeFlags;
if (!mBrightmapEnabled) f &= TEXF_Detailmap;
mPushConstants.uTextureMode = (mTextureMode == TM_NORMAL && tempTM == TM_OPAQUE ? TM_OPAQUE : mTextureMode) | f;
mPushConstants.uLightDist = mLightParms[0];
mPushConstants.uLightFactor = mLightParms[1];
mPushConstants.uFogDensity = mLightParms[2];