aargh this is horrible. how much fillrate do you have to burn?
image-based techniques reign supreme again.
basically, the method i'm using is:
- render your volumes as usual.
- switch render target to a clean white surface.
- render a single big black quad over the entire surface, using the stencil you made previously. NO Z-WRITE.
(actually, its more complex, what you draw into the surface than this, but big and black will work OK)
- very aggressively oversample that buffer
- switch back to your main render target
- render the big black quad using subtractive with saturation.
sound ok? it sounds a bit crazy to me, but it works nice. 200fps+ on my r9600pro with a bunch of lights.
if subtractive is costly on your particular GPU, do a white-on-back multiplicative. still playing with this, but it does look nice.
you can do better if sampling your framebuffer isnt gonna cost you the entire world in performance. things like applying a sobel filter with edge detection onto your z-buffer, do you can do hacked-aniso on the oversampling.
email me and ill hook you up with some screens and hopefully a demo, but it needs a dx9 card at the mo.
codemonkey@dont-spam-me@orcon.net.nz
-codemonkey