1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +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;
}