Thread: DX Opacity Bug
View Single Post
Old 08-06-2008, 03:59 AM   #3 (permalink)
doylle
Game-Artist.net Admin
doylle's Avatar
Winner of Speed Texturing 2nd Place 
doylle's User Activity: 10/10
2,385 - 345
Well, like theologic said, it's a zBuffer problem. I know i said it was a bug, but it's not a real bug that you can fix, it's just a bug because there's no real workaround to get it fixed in max as far as I know.

the problem is this. When a scene is rendered, DX will look at the ZDepth of every face for each pixel. For every object it'll check the zDepth first, and determine if an object closer to the camera has already been rendered, or if that object is in fact the closest to the camera. (all per pixel) If it is is not the closest object to camera (and therfor another object is blocking it's visability), it will not render what's behind it... So if you then apply transarency to the object (this happens in a later stage during the rendering), you will have the effect you see in your screenshot...

The logical solution would be to sort all your grass planes, from far to close, and render them in that order. but that's not possible in max (again, as far as I know).

If i'm not mistaking then you're using the viewport shader i wrote. I think i'll work on an updated version soon, have a few things i want to add to it. I'll look some more, maybe i'll find a way to fix this
doylle is offline   Reply With Quote
The Following User Says Thank You to doylle For This Useful Post: