redman2k's picture

Transparency Issues with Model and Sprite

Hello,

I have recently updated my model/sprite rendering, so items in the back will render before items in the front. I am still running into an issue and I'm not certain how to remedy it. I have attached two pictures that will hopefully help tell my story. In the first picture you can see the tree and sprite are rendered properly, the branch extends over the sprite just fine.

In the second picture I have circled the area where the issue is arising. It looks like some of the sprite is hiding the tree. My first thought was the sprite should be drawn first and then the tree, as the distance from the middle of the sprite is farther away than the distance of the middle of the tree. And if the sprite is drawn before the tree, then there shouldn't be any interference with the way the tree is being rendered as the tree doesn't exist at the time the sprite is drawn. So when I tested rendering one object at a time, the sprite is indeed rendered before the tree. If I move the camera around to get the tree to render before the sprite, it appears correctly which doesn't make sense to me. Is there something I am doing wrong or has anyone ran into an issue like this before?

Any help would be greatly appreciated.

-redman2k