WHATA WAH? how did I not know this?

Started by
12 comments, last by TheKrust 16 years, 6 months ago
Quote:Original post by ZipsterThat method is only accurate for additive blending, since straight addition is commutative. But other blending modes such as SRC/INVSRC give different results depending on render order.

While this may be technically true, the method of using the z-buffer without z-write is still useful in a lot of particle situations. Even without additive blending (smoke, etc.) the particle system will usually look fine unless you have very few or very large particles. I think it's visually more important for the 'primary' geometry to blend correctly with the particles than for the particles to blend in proper z-order with each other.

Basically all I am saying is don't throw this technique out the window as an inferior hack, it has many valid uses!
Advertisement
Quote:Original post by TheKrust
Quote:Original post by legalize

Transform the bounding box by the current World*View matrix.
Sort the bounding boxes by their farthest away Z value.


so your saying I just multiply the world and view matrcies together and I should get the absolute Z value? Hmmm... past experience would suggest that's a little too easy... am I missing something or is that really it?


All you need to do is orient the bounding boxes so that they are in the same relative order compared to the camera as they will be when rendered. You could also multiply by the projection and viewport transformations to have them all the way in screen space, but it won't make any difference in this case, as long as you are using a reasonable projection transformation.

My free book on Direct3D: "The Direct3D Graphics Pipeline"
My blog on programming, vintage computing, music, politics, etc.: Legalize Adulthood!

Quote:Original post by legalize
2. Don't draw any completely transparent geometry :-)


When I first read it I thought it was a point to think at....then I realized loool :D
Quote:Original post by fenghus
You might want to check out Alpha Testing (as oppose to Alpha Blending)


0_0... you have no idea how many problems you just solved with that one sentence...

---------------------------------------- There's a steering wheel in my pants and it's drivin me nuts

This topic is closed to new replies.

Advertisement