minetest/builtin
grorp a9fe83126a
Get rid of depth buffer workaround in the render pipeline code (#15407)
I originally wanted to get of the legacy IVideoDriver::setRenderTarget altogether,
but that ended up being too much work.
The remaining usage is in "dynamicshadowsrender.cpp".

Here's a comment I wrote about the workaround:

----------------------------------------

Use legacy call when there's single texture without depth texture
This means Irrlicht creates a depth texture for us and binds it to the FBO

This is currently necessary for a working depth buffer in the following cases:

- post-processing disabled, undersampling enabled
  (addUpscaling specifies no depth texture)

- post-processing disabled, 3d_mode = sidebyside / topbottom / crossview
  (populateSideBySidePipeline specifies no depth texture)

- post-processing disabled, 3d_mode = interlaced
  (probably, can't test since it's broken)
  (populateInterlacedPipeline specifies no depth texture)

With post-processing disabled, the world is rendered to the TextureBufferOutput
created in the functions listed above, so a depth buffer is needed
(-> this workaround is needed).
With post-processing enabled, only a fullscreen rectangle is rendered to
this TextureBufferOutput, so a depth buffer isn't actually needed.
But: These pipeline steps shouldn't rely on what ends up being rendered to
the TextureBufferOutput they provide, since that may change.

This workaround was added in 1e9640395468beb53f70303ef6b7aa72e395b7b4 /
https://irc.minetest.net/minetest-dev/2022-10-04#i_6021940

This workaround should be replaced by explicitly configuring depth
textures where needed.

----------------------------------------
2024-11-15 11:38:56 +01:00
..
async Fix itemdef defaults not being applied in async env 2023-08-14 18:16:36 +02:00
client Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
common Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
emerge Add minetest.bulk_swap_node (#15043) 2024-09-24 22:25:34 +02:00
fstk Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
game Add weights to biomes (#15142) 2024-11-12 10:53:17 +01:00
locale Dehardcode the death formspec (#15155) 2024-09-24 22:37:44 +02:00
mainmenu Fix mainmenu settings crash caused by last commit 2024-11-13 18:39:10 +01:00
profiler Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
init.lua Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
settingtypes.txt Get rid of depth buffer workaround in the render pipeline code (#15407) 2024-11-15 11:38:56 +01:00