1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Add antialiasing filters (FXAA, SSAA) (#13253)

This commit is contained in:
x2048 2023-06-28 05:30:08 +02:00 committed by GitHub
parent 442d5fc75c
commit c09a3a52ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 230 additions and 17 deletions

View file

@ -130,6 +130,11 @@ RenderStep* addUpscaling(RenderPipeline *pipeline, RenderStep *previousStep, v2f
if (downscale_factor.X == 1.0f && downscale_factor.Y == 1.0f)
return previousStep;
// When shaders are enabled, post-processing pipeline takes care of rescaling
if (g_settings->getBool("enable_shaders"))
return previousStep;
// Initialize buffer
TextureBuffer *buffer = pipeline->createOwned<TextureBuffer>();
buffer->setTexture(TEXTURE_UPSCALE, downscale_factor, "upscale", video::ECF_A8R8G8B8);