1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Expose all OpenGL filtering modes, use OpenGL names for them

Because of a review comment on the Irrlicht PR by numberZero.
This commit is contained in:
Gregor Parzefall 2023-06-24 23:36:36 +02:00 committed by sfan5
parent 6bf63d4b41
commit 7473e4cafd
12 changed files with 18 additions and 18 deletions

View file

@ -39,7 +39,7 @@ void PostProcessingStep::configureMaterial()
material.ZWriteEnable = video::EZW_ON;
for (u32 k = 0; k < texture_map.size(); ++k) {
material.TextureLayers[k].AnisotropicFilter = 0;
material.TextureLayers[k].MinFilter = video::ETMINF_NEAREST;
material.TextureLayers[k].MinFilter = video::ETMINF_NEAREST_MIPMAP_NEAREST;
material.TextureLayers[k].MagFilter = video::ETMAGF_NEAREST;
material.TextureLayers[k].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[k].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
@ -92,8 +92,8 @@ void PostProcessingStep::run(PipelineContext &context)
void PostProcessingStep::setBilinearFilter(u8 index, bool value)
{
assert(index < video::MATERIAL_MAX_TEXTURES);
material.TextureLayers[index].MinFilter = value ? video::ETMINF_BILINEAR : video::ETMINF_NEAREST;
material.TextureLayers[index].MagFilter = value ? video::ETMAGF_BILINEAR : video::ETMAGF_NEAREST;
material.TextureLayers[index].MinFilter = value ? video::ETMINF_LINEAR_MIPMAP_NEAREST : video::ETMINF_NEAREST_MIPMAP_NEAREST;
material.TextureLayers[index].MagFilter = value ? video::ETMAGF_LINEAR : video::ETMAGF_NEAREST;
}
RenderStep *addPostProcessing(RenderPipeline *pipeline, RenderStep *previousStep, v2f scale, Client *client)