Configurable sampling per custom texture in material shaders

This commit is contained in:
RaveYard 2023-08-25 08:23:24 +02:00 committed by Magnus Norddahl
commit 97eaa46b69
9 changed files with 117 additions and 27 deletions

View file

@ -102,7 +102,7 @@ sector_t *SWSceneDrawer::RenderView(player_t *player)
fbtex.reset(MakeGameTexture(new FWrapperTexture(screen->GetWidth(), screen->GetHeight(), V_IsTrueColor()), nullptr, ETextureType::SWCanvas));
GetSystemTexture()->AllocateBuffer(screen->GetWidth(), screen->GetHeight(), V_IsTrueColor() ? 4 : 1);
auto mat = FMaterial::ValidateTexture(fbtex.get(), false);
mat->AddTextureLayer(PaletteTexture, false);
mat->AddTextureLayer(PaletteTexture, false, MaterialLayerSampling::Default);
Canvas.reset();
Canvas.reset(new DCanvas(screen->GetWidth(), screen->GetHeight(), V_IsTrueColor()));