Skip to main content
gamedev.net
🔒 Locked

Particle Problem Solved!

Started by Just3D Jul 22, 2002 at 12:14 AM 0 replies 200+ views
Original Post
Just3D
Just3D
For a couple of days (or years if you count the time I spent on particle systems a while back) I have had the most annoying problem with the rendering of particles: The particles'' square texture would cover up the other particles. This creates an extremely ugly quasi-alpha blended block of texturing. I scoured the Internet and looked through books to no avail. And then I remembered the render states. More specifically, the D3DRS_ZWRITEENABLE. Previously I used this state only for drawing background images (or skyboxes), but I realized it would work for the particles as well (as long as they were the last thing drawn. And...it worked! Two lines of code fixed one of my most taxing problems (right after access violations and pointers)! I write this message so that someone else won''t have the same problem as I. (I realize many of you probably already know this trick to rendering particles, but I am also writing this message because it is a rare thing to have code work on the first compile). Anyways, Happy Coding.
"There are only three types of people in this world: those who can count, and those who can''t." Just3D Justin Nordin J Squared Productions www.jsquaredproductions.com
"There are only three types of people in this world: those who can count, and those who can't."Just3DJustin NordinJ Squared Productionswww.jsquaredproductions.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.