Interesting Alpha-Blending Issue with DirectX 8
Posted on 2005-04-08
I am writing a product that uses DirectX 8.a and I have reached a standstill.
Here is what I am doing:
I have a scene made by small cubes arranged in a fractal order (pretty random)
in x, y, z coordinates. Firstly I draw these with simple color, no texture, and alfa blending. Then I have a plane made by 2 triangles which I draw using color, texture and alfa blending in front of the scene. The goal is to let the user draw with a "pen" onto the plane, and to let him/her see a change in the scene behind (reordering the cubes). The problem is that I cannot seem to find the correct rendering states to allow both parts to be easily discerned (both are fully colored, but the cubes have a gray background and they are centered in about 2/3 of the scene).
The cubes have a transparency of 0x7f and I tried using several transparencies for the plane with no avail.
Currently, the plane has 0xff transparency on the diffuse color,
Can anyone point me in the right direction? What rendering states and texture stages should I use?
Thank you very much!