Jump to content
  • Advertisement
Sign in to follow this  
Halsafar

Alpha render states

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

I believe I'm right when I say that the pixel shader is applied before the alpha blending is. The alpha blending is done within the frame buffer which is where the PS outputs to. Regardless of that, I have a problem and I do not know the render states very well. So I have 2 questions, only 1 of which needs answering: - Is there a site which nicely explains what all the render states do? - I have a blue sky dome and a sky plane. The sky dome has a blue gradient on it. The sky plane has is covered completely grey except for varying clouds. How can I blend the two together nicely so the clouds remain white and don't take in so much of the blue.

Share this post


Link to post
Share on other sites
Advertisement
The D3D SDK explains all the render states.

On the left, you'll see "D3DBLEND". That explains how each of the blending states calculate their final colours.


Regarding the clouds, you'll need an alpha blend mode that modulates by colour..
I think src = ONE, dest = INVSRCCOLOR may work, but I usually just end up playing with src and dest blend ops until I get the desired effect.

It depends, however. Is that grey your "completely transparent" colour? Or do you want that grey to be a grey-washed blue when put in conjunction with your dome?

Share this post


Link to post
Share on other sites
I suppose its hard to answer that since it all needs a lot of tweaking.
I may post a screenshot.

But yes, I'd like the grey completly gone... With the states I am using now it works pretty well.

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!