Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualShawn619

Posted 31 May 2013 - 12:28 AM

I want the alpha on the windows of my car(alpha=0.3, every other part of car alpha=1.0(no transparency)) to blend properly with my shader lighting.

 

I have the blend function as follows:

 

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

 

If I disable blending all together, I get:

2qiquja.jpg

 

If I disable shading, enable blending, I get:

f51tt.jpg

 

If enable shading, enable blending, I get:

js1z5w.jpg

 

Do I need to change my blendFunc?


#1Shawn619

Posted 31 May 2013 - 12:27 AM

I want the alpha on the windows of my car(alpha=0.3) to blend properly with my shader lighting.

 

I have the blend function as follows:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

 

If I disable blending all together, I get:

2qiquja.jpg

 

If I disable shading, enable blending, I get:

f51tt.jpg

 

If enable shading, enable blending, I get:

js1z5w.jpg

 

Do I need to change my blendFunc?


PARTNERS