Jump to content
  • Advertisement
Sign in to follow this  
Alundra

Blending without changing the alpha source

This topic is 1389 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

Hi,

I have a GBuffer with RGB = albedo and Alpha = Lighting Model (float converted to int).

The problem is when I render decal the alpha is modified, then I have bad rendering.

http://msdn.microsoft.com/en-us/library/windows/desktop/ff476087%28v=vs.85%29.aspx

The best way to avoid this conflict is to set the RenderTargetWriteMask of D3D11_RENDER_TARGET_BLEND_DESC to only write RGB ?

Thanks for the help

Share this post


Link to post
Share on other sites
Advertisement

Yea that's the question, using opengl that's : glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_FALSE);

But using Direct3D11 I didn't found a good doc about it, just the blend setup, that's why I asked.

Share this post


Link to post
Share on other sites

Yeah, the D3D11 equivalent is:

desc.RenderTargetWriteMask =  D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN | D3D11_COLOR_WRITE_ENABLE_BLUE;

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!