XNA UK User Group

A helping hand for bedroom coders throughout the land.
in

RandomChaos

Generic XNA - Fire 2D & 3D Shaders

http://www.youtube.com/v/F2RMt7KKpW0 <p><a href="http://www.youtube.com/v/F2RMt7KKpW0">http://www.youtube.com/v/F2RMt7KKpW0</a></p>

Well, this should be the final post on these flame shaders. As you have seen in the previous posts I have created 2D and 3D flame shaders based on the flame shader that comes with the NVIDIA SDK. When I initially created the 2D shader I found there was an issue with it when drawn with the 3D effect, turns out the issue was in the FireEmitterBase class, it was fixed by me setting the effect save state in the Begin call. Once that was done it all rendered fine.

The only issue with the 2D flame shader is that you have to make a draw call per flame as an index.offset has to be passed per flame or the flame animations will all look the same.

I have put them all in the same project, just added a new class for the 2D flame, as well as the shader it's self and a floor class.

Solution can be found here.

Comments

 

GameDevKicks.com said:

You've been kicked (a good thing) - Trackback from GameDevKicks.com

May 20, 2008 3:41 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About Nemo Krad

Have been a professional developer since 1995. My skill set ranges from C/C++, VB6,MSSQL, Java Script, VB Script, HTML/ASP, Java, C#, ASP.NET as well as others. I started 3D and games development when the first release of XNA came out in December 2006 and have become addicted to it.