Search code examples
c#directxtransparentdirect3ddirectx-9

How to set transparent to see through surface underneath in Microsoft.DirectX at top view?


I render a 3D data by setting device.RenderState.AlphaBlendEnable = true

it gives a side view like below: Pic1 shows side view @ solid filled mode

Pic2 shows side view @ wired frame mode

Now my top view looks like this, the outer surface layer covered the underneath layers and resulting only outer layer is displayed at top view.

Pic3 shows top view @ solid filled mode

I would like to view the underneath layer from top view. How do I do this? Is there any setting can be done in Microsoft.DirectX ?

Update: Question is solved by myself

device.RenderState.ZBufferWriteEnable = false;

Solution

  • device.RenderState.ZBufferWriteEnable = false;