Sign in to follow this  

Blending several polygons makes the last image very shiny!!!

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

Here is the deal, i want to make a good looking smoke out of a texture but when i make 3 or 4 rectangles with such texture and i want to blend them, the last image is very shiny. According to mathematic stuff and blending function i use, this behavior makes sense. I want to make a particle system where the parts which all textures are available is not so shiny.

Here are the statemachine whatsoevers:

glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glEnable(GL_DEPTH_TEST) ;
glDepthFunc(GL_ALWAYS);
glBlendFunc (GL_SRC_ALPHA,1);

Please help me out. Also if you have good tutorials or links about making clouds, fire, particle systems and etc please let me know.

Share this post


Link to post
Share on other sites
You shouldn't specify a number for glBlendFunc, but GL_ONE, if that's the behavior you want (though GL_ONE happens to be 1, so that's not a problem). However, in this case I believe you want glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).

Share this post


Link to post
Share on other sites

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