Sign in to follow this  
Halsafar

Alpha render states

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this