Jump to content
  • Advertisement
Sign in to follow this  
riruilo

OpenGL Why do ambient and specular materials have a 4th component?

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

Hi friends! One question, I understand that the 4th of diffuse material is the alpha value (opacity or transparency) but what do opengl need a 4th component on ambient or specular material (or lights) component? Thanks a lot.

Share this post


Link to post
Share on other sites
Advertisement
I suspect the answer is they're colors and colors have 4 components in OpenGL. Another answer is, why not? Maybe there are some fun tricks you can do with the 4th component. Remember, not everyone wants to do default rendering.

Share this post


Link to post
Share on other sites
Why should there be a difference between diffuse and ambient/specular. In the end it boils down how you calculate your final fragment color. If you are using the fixed function then you can look in the OpenGL docs to see how it is done.

Hope this helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by CableGuy
Why should there be a difference between diffuse and ambient/specular. In the end it boils down how you calculate your final fragment color. If you are using the fixed function then you can look in the OpenGL docs to see how it is done.

Hope this helps.


I meant, What is the meaning of alpha component of specular and or ambient colors?

Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by riruilo

I meant, What is the meaning of alpha component of specular and or ambient colors?

Thanks!


basically nothing as long as your using the fixed function pipeline

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!