From 8480a390a1c7ddd02558daae2dd3257bbc9a2e99 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 2 Jun 2020 11:45:34 +0200 Subject: [PATCH] - synced texture sampler setup fixes from Raze. --- src/common/audio/music/music.cpp | 8 ++++---- src/common/textures/hw_material.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/common/audio/music/music.cpp b/src/common/audio/music/music.cpp index 2d9008021..1f8b0a004 100644 --- a/src/common/audio/music/music.cpp +++ b/src/common/audio/music/music.cpp @@ -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 () diff --git a/src/common/textures/hw_material.cpp b/src/common/textures/hw_material.cpp index 8df0b6298..c4a1ba9d3 100644 --- a/src/common/textures/hw_material.cpp +++ b/src/common/textures/hw_material.cpp @@ -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(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; }