Hi,
I need to render MRI data with transparency. I can do it efficiently by instancing cubes. Opaque rendering works great so far.
My question is: for transparency to work, will it indeed work if I just enable GL blending (GL_BLEND)?
eg.
glBlend(GL_BLEND)
glBlendFunc(GL_SRC_ALPHA, GL_ONE)
I know the GPU will process triangles in random/arbitrary order - I know I can’t control the order.
I saw there are techniques around using order-independent transparency (OIT), using sophisticated shaders, but I would like to know if GL blending is supposed to work in the first place.
I mean, why would it not work? Every time a cube is rendered, some color intensity (say 0.01f) will be added to the color buffer. And voilà. Why would rendering order be important? I guess order is only important when dealing with objects using different colors? (as per example shown on Wikipedia page for OIT)
I would greatly appreciate your insight,
F