I am experiencing a problem with blending. I am rendering two objects that occupy the same space (i.e. exactly the same x, y and z coords) but when blending is turned on for rendering the second object, I cannot see any of the first object.
If I only render one of the objects using blending then I can see through it…does anyone know why I may be having a problem??
I have also tried moving the first object so that the second is now above, but again blending has no effect.
I have tried what has been suggested, with no success as of yet !
I may have found where the problem lies. If I zoom out of the scene far enough, the objects start to disappear. Before you say that it has reached the far clipping plane IT HASN’T, It is being obscured by what appears to be a silhoutted version of the objects themselves.!!?!?!?!?
I`m not sure if Ive explained this well, but if anyone understands what I have said I would be greatful for any hints as to what might be going wrong.
I still haven’t managed to figure out the problem. Even when the scene changes, the silhouetted image appears to be stationary about the origin. I would really appreciated any ideas as to what may be causing it, as I have tried everything I can think of with no success.
Thanks,
Steve
[This message has been edited by ssaunders (edited 02-12-2001).]
I have set my alpha values for the material properties to 0.5 (50% transparency)…so I cant see that being the problem…as I said the transparency works if I only rendered the “transparent” surface.
Originally posted by Relic: Why do you clear with alpha = 0.5?
The material for both the opaque and transparent surfaces has the alpha value set to 0.5f. The problem seems to be with the glDepthMask function in that it doesn’t seem to make the depth buffer read only when doing the transparent object, hence it being opaque.
The depth buffer should not affect the color buffer blending at all. If you say your transparent object comes out opaque that means no fragment rejection because of depth test fails has occured and color buffer blending isn’t done correctly.
Such problems should always be crosschecked with the MS GDI Generic OpenGL implementation if you have no other HW in reach.
Select a pixelformat with the PFD_GENERIC_FORMAT bit set in dwFlags and check the renderer string with glGetString(GL_VENDOR). It should say “Microsoft Corp.”.
If this implementation shows the same problem, you program is wrong, if not, you probably found a driver bug.