Alpha textures and the ZBuffer?

Started by Kippykip, November 15, 2017, 18:12:51

Previous topic - Next topic

Kippykip

I noticed a while back in MiniB3D and OpenB3D, that textures with the alpha flag end up looking really weird in front of other polygons.

Does anyone happen to know of any workarounds?

markcwm

One thing it might be is when meshes are at the same coordinates the z/depth buffer can't calculate which is to be drawn first thus affecting alpha textures, a small offset is supposed to fix it maybe as little as 0.0001 units.

Kippykip

Quote from: markcwm on November 15, 2017, 20:37:16
One thing it might be is when meshes are at the same coordinates the z/depth buffer can't calculate which is to be drawn first thus affecting alpha textures, a small offset is supposed to fix it maybe as little as 0.0001 units.
Yeah it's something to do with OpenGL itself not changing the order the meshes are drawn with alpha textures. They're treated the same, some thread said by using EntityAlpha 0.99 shows the full effect.

But come to think of it, I haven't tried completely separating the polygon with the alpha texture, as the vertices are connected to the meshes around it.

Kippykip


Wow that actually worked! :o
Thanks once again mark! You're always extremely helpful on these forums

markcwm

Hi Kip,

glad to help, I got that tip from Edzup on the Minib3d Monkey threads so credit to him, it seems to be a great little 3d engine for mobile, I still haven't even looked at it yet so I'll have to do that soon.