How is air rendered in minetest with glsl?

For people working on the C++ code.
Post Reply
badentry
Member
Posts: 36
Joined: Tue Jul 09, 2024 07:56

How is air rendered in minetest with glsl?

by badentry » Post

I wonder how empty nodes like air or similar blocks like glass is rendered in minetest, in the glsl src code

User avatar
srifqi
Member
Posts: 577
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi
Location: Indonesia

Re: How is air rendered in minetest with glsl?

by srifqi » Post

Air is simply no node (nothing). I don't understand much about other nodes.
Saya dari Indonesia! · Terjemahkan Minetest! · my mods · My nickname in IPA: /es.rif.qi/

User avatar
TenPlus1
Member
Posts: 3962
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: How is air rendered in minetest with glsl?

by TenPlus1 » Post

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.

User avatar
Andrey01
Member
Posts: 2586
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: How is air rendered in minetest with glsl?

by Andrey01 » Post

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

User avatar
Hybrid Dog
Member
Posts: 2850
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: How is air rendered in minetest with glsl?

by Hybrid Dog » Post

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.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest