1

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?

Christian Rau
  • 45,360
  • 10
  • 108
  • 185
Pladnius Brooks
  • 1,248
  • 3
  • 19
  • 36
  • 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 Nov 11 '11 at 13:59
  • If you draw the transparent textures without sorting, are there any noticeable artifacts? – fintelia Nov 12 '11 at 20:36

1 Answers1

2

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

datenwolf
  • 159,371
  • 13
  • 185
  • 298