- synced texture sampler setup fixes from Raze.

This commit is contained in:
Christoph Oelckers 2020-06-02 11:45:34 +02:00
parent 83153efcad
commit 8480a390a1
2 changed files with 9 additions and 8 deletions

View File

@ -166,9 +166,9 @@ static bool S_StartMusicPlaying(ZMusic_MusicStream song, bool loop, float rel_vo
//==========================================================================
//
// S_PauseSound
// S_PauseMusic
//
// Stop music and sound effects, during game PAUSE.
// Stop music, during game PAUSE.
//==========================================================================
void S_PauseMusic ()
@ -183,9 +183,9 @@ void S_PauseMusic ()
//==========================================================================
//
// S_ResumeSound
// S_ResumeMusic
//
// Resume music and sound effects, after game PAUSE.
// Resume music, after game PAUSE.
//==========================================================================
void S_ResumeMusic ()

View File

@ -40,7 +40,7 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
mShaderIndex = SHADER_Default;
sourcetex = tx;
auto imgtex = tx->GetTexture();
mTextureLayers.Push({ imgtex, scaleflags });
mTextureLayers.Push({ imgtex, scaleflags, -1 });
if (tx->GetUseType() == ETextureType::SWCanvas && static_cast<FWrapperTexture*>(imgtex)->GetColorFormat() == 0)
{
@ -52,7 +52,8 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
{
mShaderIndex = tx->GetShaderIndex();
}
// no brightmap for cameratexture
mTextureLayers.Last().clampflags = CLAMP_CAMTEX;
// no additional layers for cameratexture
}
else
{
@ -65,7 +66,7 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
{
for (auto &texture : { tx->Normal.get(), tx->Specular.get() })
{
mTextureLayers.Push({ texture, 0 });
mTextureLayers.Push({ texture, 0, -1 });
}
mShaderIndex = SHADER_Specular;
}
@ -73,7 +74,7 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
{
for (auto &texture : { tx->Normal.get(), tx->Metallic.get(), tx->Roughness.get(), tx->AmbientOcclusion.get() })
{
mTextureLayers.Push({ texture, 0 });
mTextureLayers.Push({ texture, 0, -1 });
}
mShaderIndex = SHADER_PBR;
}