1
votes

I wrote a BSP renderer. I finally added the ability to render masked textures using alpha testing. It works great and I don't have to sort the scene's geometry. Now, I need the ability to have textures that are semi transparent. Is there a way to do this again with alpha testing so I can avoid sorting. If not, does anyone have a good tutorial on sorting possibly with BSP tree geometry?

1
Isn't a BSP tree's main application the sporting of geometry? So if you have a BSP tree just traverse it appropriately to gain the sorting. Unless you speak of Quake .bsp files, which don't really have anything to do with classical BSP trees and should rather be called .pvs files. - Christian Rau
If you draw the transparent textures without sorting, are there any noticeable artifacts? - fintelia

1 Answers

2
votes

Is there a way to do this again with alpha testing so I can avoid sorting.

No.

If not, does anyone have a good tutorial on sorting possibly with BSP tree geometry?

The nice thing about BSP trees is, that they do the sorting for you for free. Only that the spit out the primitives front to back, so you'll have to build a list of primitives from the BSP first and the reverse iterate that list.

http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/bsp-tree-faq-r657