Page 1 of 1

alpha channel of textures not working

PostPosted: Sat Sep 08, 2012 04:14
by tonyka
alpha channel of textures not working properly, do not use the full range for the value of transparency, however it works perfectly in inventory...
ideally is, who uses a range of 16 shades, minimum

transparency applies only to values below 50%, and if applied in overlapping textures (such as minerals and stone), an alpha with halftones, event of such interference with the block ...

This has a solution?

PostPosted: Sat Sep 08, 2012 08:05
by wokste
The problem MAY be more difficult than you imagine. Although I don't see a problem in your case, since it is an overlapping texture. This may be the cause:
In openGL, when you have 2 overlapping surfaces, it will determine which one should be on top using a technique called the depth buffer. However, the depth buffer does not work that well with transparency. That is why usually the non-transparent parts are drawn first. Then the transparent parts are drawn and then the HUD (inventory, menu's, etc).
There are solutions but it will require more of the cpu or look far uglier.

PostPosted: Sat Sep 08, 2012 10:32
by tonyka
That might explain the trick ...

but
why not accept images with alpha channels over "1 bit" deep?

PostPosted: Sat Sep 08, 2012 11:52
by wokste
Because it is much easier to forbid translucent textures while rendering. In that case, you dont have to order surfaces by distance but only have to enable the depth buffer.

PostPosted: Sat Sep 08, 2012 18:55
by tonyka
great!!
but that can not be changed from minetest.conf

That sounds like dangerous territory for a infographics artist ...