We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5083 - Add an ability to setup a float-point depth buffer
Summary: Add an ability to setup a float-point depth buffer
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: don't know
Hardware: All All
: P2 API change
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-11 06:35 UTC by Andrei Kortunov
Modified: 2020-06-26 11:54 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Kortunov 2020-04-11 06:35:45 UTC
As I understood, by default SDL uses a 16-bits depth buffer, with ability to setup something like GL_DEPTH24_STENCIL8 via such command:

SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);

Unfortunately, 24-bits depth buffer precision is still not enough for open-world games. Is it possible to setup a float-point depth buffer via SDL, a GL_DEPTH_COMPONENT32F, or maybe even GL_DEPTH32F_STENCIL8? If it is not, it would be nice to have such ability.
Comment 1 psi29a 2020-06-26 11:54:05 UTC
I would like to second this request. 

OpenMW[1] would really benefit from having more depth buffer precision. It would all but eliminate an issue we are having with z-fighting[2].

I'm sure other software that use libsdl would benefit from this.

Cheers,
Bret Curtis


[1] https://openmw.org/
[2] https://en.wikipedia.org/wiki/Z-fighting