Alpha Blending Messed Up

Started by
6 comments, last by GameDev.net 19 years, 2 months ago
Hey guys. I've done this so many times before, and not once has it turned out like this. [image] The left is the one with alpha, the right one is opaque. My blending is set to SRC: SRCALPHA, and DEST: INVSRCALPHA. I enabled depth testing. My model was imported from 3DS Max, and I disabled culling. Please help. Thanks.
function(prototype);
Advertisement
Quote:I enabled depth testing.
you need to disable it or sort the polygons
yes i have tried both.
disabling z would make it less although still messed up.
and i don't know why i would have to sort it.
when i worked with beginner tutorials when i was just starting out on directx,
i never had to sort anything. and it worked fine.

any other suggestions? thanks.
function(prototype);
do you have lighting enabled?
if so it might be the normals causing bad lighting
yes i do...
how do you suppose i should fix it, if that's the problem?
function(prototype);
maybe turn culling back on?
well with backface culling, it only shows the front faces.
with frontface culling, it only shows the back faces.
and i would like to see both. that's why i'm using blending.
function(prototype);
It will look better (cheap man's sorting, not perfect but good) if you:

1 Set backface culling to only show the back faces
2 Draw the object
3 Set backface culling to only show the front faces
4 Draw the object again

This topic is closed to new replies.

Advertisement