Jump to content
  • Advertisement
Sign in to follow this  
ChristophR

OpenGL Specular lights with DX and OpenGL

This topic is 4707 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! I want to write an application which can either use DirectX or OpenGL. Now I have a little problem with my specular lights: DirectX has a Power attribute in it's material structure. OpenGL has no such attribute, but it has a GL_SHININESS setting. But it seams that these two attributes are not equal. The DirectX documentation says that the Power attribute controls the sharpness (and not actually the light intensity). Therefore, if I set the Power attribute to 1, the light is very bright and very smooth. But if I set OpenGL's shininess attribute to 1, the light is nearly invisible. Does anybody have an idea how I could solve the problem? Are there any other attributes which I did not mention so far? Thanks in advance. rgds.

Share this post


Link to post
Share on other sites
Advertisement
I have experience in both DirectX and OpenGL. From my past experience, OpenGL's shininess means how much light is reflected for specular part. Larger value means more specular intensity. Direct's power means how concentrate light's specular part it. Smaller value (approaches 0) means more spread of specular while larger value (approaches 100 or infinity) means more concentrate of specular. Hope this helps.

Share this post


Link to post
Share on other sites
If I understand correctly, you should be able to mimic the effect by setting the material specular color to specularcolor * shininess. Specular is additive, so scaling the color is the same as having it add less via a seperate control.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!