Results 1 to 3 of 3

Thread: Specular Lighting on a Texture

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    California, USA
    Posts
    167

    Specular Lighting on a Texture

    Hello,

    I have run into a bit of a problem. I am doing different specular lighting effects on a highly tesselated mesh, which looks really nice by the way. When I apply my metal texture ( I am trying to get a metallic shine ) I lose all my lighting. I enabled blending but this doesnt seem to work correctly. Do I have to render the mesh with my lighting effects, then render it again with my texture and lighting disabled, then blend? If so, are there any other options? Because rendering my mesh twice will be quite costly. One other thing I have noticed is that I have to draw my mesh in pure white, so the texture is not colored differently. Does specifying a primitive color with glColor3f() before I draw have any effect on lighting? Thanks for any help.

    Old GLman

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: Specular Lighting on a Texture

    this has been fixed in opengl1.2
    search for 'seperate specular lighting/texture'
    btw the answers in the faq (www.opengl.org right side of page)

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    California, USA
    Posts
    167

    Re: Specular Lighting on a Texture

    Ah sorry about that I completley forgot about the FAQ. Anyways I have the two pass technique put in at the moment, and it looks really nice, and not as costly as I thought. It's nice having a seperate specular lighting mode though. Being forced to use a two pass technique is really a horrible solution, imo. Thanks for the pointer.

    Old GLman

Similar Threads

  1. specular lighting
    By gl_Beginner in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-08-2012, 01:11 AM
  2. How to introduce Specular and Diffuse lighting into Bumped lighting
    By Liable in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 12-06-2004, 05:48 PM
  3. Specular Lighting with Texture Shaders (artifacts)
    By Jan in forum OpenGL: Advanced Coding
    Replies: 16
    Last Post: 08-27-2003, 07:32 AM
  4. Replies: 5
    Last Post: 09-12-2002, 08:08 PM
  5. specular lighting
    By sb in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 05-09-2001, 12:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean