Page 1 of 1
How is air rendered in minetest with glsl?
Posted: Mon Aug 05, 2024 03:59
by badentry
I wonder how empty nodes like air or similar blocks like glass is rendered in minetest, in the glsl src code
Re: How is air rendered in minetest with glsl?
Posted: Sat Oct 05, 2024 11:00
by srifqi
Air is simply no node (nothing). I don't understand much about other nodes.
Re: How is air rendered in minetest with glsl?
Posted: Sat Oct 05, 2024 12:49
by TenPlus1
Air blocks aren't rendered in minetest engine from what I gather, it's an empty space that doesn't need to be drawn, glasslike nodes on the other hand would need to be processed as transparent overlay onto the background behind it.
Re: How is air rendered in minetest with glsl?
Posted: Mon Oct 07, 2024 07:57
by Andrey01
Air doesn't have the geometry at all and therefore doesn't get rendered. This is well seen in this part of the engine code (when the function has found out from its ContentFeatures its drawtype == NDT_AIRLIKE, it just does a return:
https://github.com/minetest/minetest/bl ... .cpp#L1742
Re: How is air rendered in minetest with glsl?
Posted: Tue Oct 15, 2024 18:11
by Hybrid Dog
srifqi wrote: ↑Sat Oct 05, 2024 11:00
Air is simply no node (nothing). I don't understand much about other nodes.
No, "air" and "ignore" are two different nodes.