"Render Target" format
You can set any format for which the device supports alpha-blending. In D3D9 you query the device with a specific format, to see whether it supports post-pixel-shader blending operations.
let me explain my problem . I do these jobs:
1 - create a 100x100 texture with RENDER_TARGET usage.
2 - set render target as previous texture surface.
3 - clear target with a transparent color (Ex. 0x00FF00F0)
4 - get render target texture and assign it to a quad.
5 - change render target to front buffer and render quad to it
with D3DRS_SRCALPHA and D3DRS_DESTINVSRC render states.
after above processes when i present device i saw a 100x100 quad on screen!
because i clear render target to a transparent color it must be no
quad on screen.
Can you help me...?
Thanks.
1 - create a 100x100 texture with RENDER_TARGET usage.
2 - set render target as previous texture surface.
3 - clear target with a transparent color (Ex. 0x00FF00F0)
4 - get render target texture and assign it to a quad.
5 - change render target to front buffer and render quad to it
with D3DRS_SRCALPHA and D3DRS_DESTINVSRC render states.
after above processes when i present device i saw a 100x100 quad on screen!
because i clear render target to a transparent color it must be no
quad on screen.
Can you help me...?
Thanks.
Quote:Original post by mohandes_philip
5 - change render target to front buffer and render quad to it
with D3DRS_SRCALPHA and D3DRS_DESTINVSRC render states.
Do you mean: Set D3DRS_SRCBLEND to D3DBLEND_SRCALPHA and D3DRS_DESTBLEND to D3DBLEND_INVSRCALPHA? If not, then that might be the problem.
Quote:Original post by ET3DQuote:Original post by mohandes_philip
5 - change render target to front buffer and render quad to it
with D3DRS_SRCALPHA and D3DRS_DESTINVSRC render states.
Do you mean: Set D3DRS_SRCBLEND to D3DBLEND_SRCALPHA and D3DRS_DESTBLEND to D3DBLEND_INVSRCALPHA? If not, then that might be the problem.
yes.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement