I’m trying to do volume rendering and sometimes I traverse the data front-to-back and sometimes back-to-front. Back-to-front compositing works fine:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
but when I try front-to-back using this:
glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE);
everything becomes white.
I have 8 alpha bit planes [I checked with glGetIntegerv(GL_ALPHA_BITS, &i)] and I’m using pbuffers (I don’t know if it matters). I am clearing the image with glClearColor(0,0,0,0) (I’ve tried with 0,0,0,1 without success anyway).
Any ideas?
Edited: I said I was using the same compositing equation, but I copied and pasted the same API call by mistake. It is fixed now.