1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Add 10-bit texture format and setting to chose PP color depth

(and move some settings to the advanced category)
This commit is contained in:
sfan5 2024-11-28 10:38:51 +01:00
parent e545e96d2b
commit 36edc3f161
7 changed files with 48 additions and 20 deletions

View file

@ -155,8 +155,11 @@ void populatePlainPipeline(RenderPipeline *pipeline, Client *client)
video::ECOLOR_FORMAT selectColorFormat(video::IVideoDriver *driver)
{
if (driver->queryTextureFormat(video::ECF_A16B16G16R16F))
u32 bits = g_settings->getU32("post_processing_texture_bits");
if (bits >= 16 && driver->queryTextureFormat(video::ECF_A16B16G16R16F))
return video::ECF_A16B16G16R16F;
if (bits >= 10 && driver->queryTextureFormat(video::ECF_A2R10G10B10))
return video::ECF_A2R10G10B10;
return video::ECF_A8R8G8B8;
}

View file

@ -311,6 +311,7 @@ void set_default_settings()
// Effects
settings->setDefault("enable_post_processing", "true");
settings->setDefault("post_processing_texture_bits", "16");
settings->setDefault("directional_colored_fog", "true");
settings->setDefault("inventory_items_animations", "false");
settings->setDefault("mip_map", "false");
@ -567,6 +568,8 @@ void set_default_settings()
settings->setDefault("active_block_range", "2");
settings->setDefault("viewing_range", "50");
settings->setDefault("leaves_style", "simple");
// Note: OpenGL ES 2.0 is not guaranteed to provide depth textures,
// which we would need for PP.
settings->setDefault("enable_post_processing", "false");
settings->setDefault("debanding", "false");
settings->setDefault("curl_verify_cert", "false");