GPWiki.org
GPWiki.org
It is currently Sat May 25, 2013 9:46 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: XNA/HLSL dillemma
PostPosted: Mon Jan 16, 2012 3:39 am 
Grand Optimizer
User avatar

Joined: Mon Jan 17, 2005 6:01 pm
Posts: 352
Location: Canada
Anyone familiar with HLSL?

Basically Im wondering if theres a way to sneak an effect into the spritebatch without setting it's SortMode to Immediate.. the reason is that I have a bunch of different sprites all being drawn at different layer depths.. using immediate oubviously screws up the layer depth.. I tried using a seperate spritebatch for each sprite group, but doing that essentially ignores the layer depth property altogether. I cant simply call the seperate spritebatches in the proper 'order', as some of my layer depth logic is conditional.

Any ideas?

thanks.

_________________
"None are more hopelessly enslaved than those who falsely believe they are free."
"It is no measure of health to be well adjusted to a profoundly sick society."
"Hope is the first step on the road to dissapointment." -Jonah Orion
http://tankzgame.blogspot.com


Top
 Profile  
 
 Post subject: Re: XNA/HLSL dillemma
PostPosted: Mon Jan 16, 2012 2:18 pm 
Mumbo Jumbo
User avatar

Joined: Fri Aug 20, 2004 1:15 pm
Posts: 804
Location: Michigan, USA
give each sprite a layer index, then in one spritebatch, loop through all the sprites and only draw layer one, then loop again for layer 2, etc.

_________________
The path to hell is paved with clever code.


Top
 Profile  
 
 Post subject: Re: XNA/HLSL dillemma
PostPosted: Mon Jan 16, 2012 10:20 pm 
Grand Optimizer
User avatar

Joined: Mon Jan 17, 2005 6:01 pm
Posts: 352
Location: Canada
Il give that a shot, thanks for the reply!

_________________
"None are more hopelessly enslaved than those who falsely believe they are free."
"It is no measure of health to be well adjusted to a profoundly sick society."
"Hope is the first step on the road to dissapointment." -Jonah Orion
http://tankzgame.blogspot.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group