I am working with directx. I am displaying two objects on my window. They are intersecting each other. I find the intersecting object.
My problem is-
I want two original objects to be transparent and the resulting intersected part to be opaque, so that the intersected part can be seen clearly.
I found some question related to transparency but they are related to transparency of window. But I want the object to be transparent.
You enable alpha blending by doing this:
Set the final parameter to FALSE to disable it.
There are multiple different types of blend that are now available to you. The simplest is additive alpha blending set as follows:
Other forms may well require sorting of polys to display correctly.
Its also worth noting that if you want to see the back of the model as well you need to set the cull mode to none: