Sign in to follow this  

Making ambient color transparent

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

Hello! This is probably an alpha blending related question: I have a sphere lighted on a side by a distant light. This sphere has an ambient color (black, transparent) a diffuse color (gray, opaque) and a texture (opaque), and stands in a lightblue background. I'd like to make the ambient color appear transparent. Setting it to background color doesn't give the right result. Here is what I do: Stage 0: - set texture stage render state - set an alpha render state for the stage giving: > alpha blend enabled > alpha test enabled, default test function (greater, if I'm not wrong) > alpha source function: 1-SRCalpha > alpha dest function: 1 This gives some nice results as shown in the following picture: but, as you can see, the texture is saturated to white due to the alpha dest function, I suppose. QUESTION: how do I make another overlay (render pass or texture stage) to replace the opaque white with the color texture and leaving transparency from the previous stage? Thanks a lot for any help you can give.

Share this post


Link to post
Share on other sites

This topic is 3591 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.

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