Jump to content
  • Advertisement
Sign in to follow this  
mohandes_philip

"Render Target" format

This topic is 3610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
Quote:
Original post by ET3D
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.


yes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!