TGEA Weapon Trails... now with broken alpha (pics)
by Ashley Leach · in Technical Issues · 07/19/2007 (1:42 am) · 3 replies
Hi All,
Let me preface this by saying my DX skills are not terrific.
I have been writing weapon trails in TGEA but the alpha sorting (or something) in my code is broken.
I ported the day night resource the other day so that might be the issue too.
Basically when the TriStrips render, they are white (correct color) if im looking below the horizon, and sky colored if i look above the horizon (if day turns to night the color of the quads actually changes, which while cool is wrong).
I was assuming this has a lot to do with rendering states, either ones i need to set in my trail routine, OR ones i forgot to unset in the day night port.
If anyone can suggest what it may be i'd be grateful.
All help appreciated.
[IMG]http://img503.imageshack.us/img503/9696/brokenalpha1vu5.th.jpg[/IMG]
[IMG]http://img441.imageshack.us/img441/2646/brokenalpha2ze5.th.jpg[/IMG]
Let me preface this by saying my DX skills are not terrific.
I have been writing weapon trails in TGEA but the alpha sorting (or something) in my code is broken.
I ported the day night resource the other day so that might be the issue too.
Basically when the TriStrips render, they are white (correct color) if im looking below the horizon, and sky colored if i look above the horizon (if day turns to night the color of the quads actually changes, which while cool is wrong).
I was assuming this has a lot to do with rendering states, either ones i need to set in my trail routine, OR ones i forgot to unset in the day night port.
If anyone can suggest what it may be i'd be grateful.
All help appreciated.
[IMG]http://img503.imageshack.us/img503/9696/brokenalpha1vu5.th.jpg[/IMG]
[IMG]http://img441.imageshack.us/img441/2646/brokenalpha2ze5.th.jpg[/IMG]
About the author
www.ashleyleach.com.au www.silhouette-studios.com.au
#2
Without z writing on the trail it doesnt draw. but I solved this issue, through some ZWrite changes to the sky code.
Thanks for getting me on the right track.
I actually have a new problem now, but i posted it in the private TGEA forums.
Thankyou.
07/19/2007 (11:05 pm)
Hi Tom,Without z writing on the trail it doesnt draw. but I solved this issue, through some ZWrite changes to the sky code.
Thanks for getting me on the right track.
I actually have a new problem now, but i posted it in the private TGEA forums.
Thankyou.
#3
07/19/2007 (11:31 pm)
Awesome work ashley.
Associate Tom Spilman
Sickhead Games
That looks like a z-buffering issue... the trail is being drawn before the terrain and the trial has z-buffer writing enabled. Since the trail is closer to the camera than the terrain, the terrain cannot write to that area of the screen.