mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Add support for ECF_D24 texture format
and prefer it over D32 for our depth buffer, this can have performance benefits
This commit is contained in:
parent
3c42cc8684
commit
4aae31ad5e
6 changed files with 15 additions and 2 deletions
|
@ -162,8 +162,8 @@ video::ECOLOR_FORMAT selectColorFormat(video::IVideoDriver *driver)
|
|||
|
||||
video::ECOLOR_FORMAT selectDepthFormat(video::IVideoDriver *driver)
|
||||
{
|
||||
if (driver->queryTextureFormat(video::ECF_D32))
|
||||
return video::ECF_D32;
|
||||
if (driver->queryTextureFormat(video::ECF_D24))
|
||||
return video::ECF_D24;
|
||||
if (driver->queryTextureFormat(video::ECF_D24S8))
|
||||
return video::ECF_D24S8;
|
||||
return video::ECF_D16; // fallback depth format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue