Results 1 to 2 of 2

Thread: Spheremapping + specular highlights problem !

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2004
    Location
    Germany
    Posts
    7

    Spheremapping + specular highlights problem !

    Hi !

    I try to get a chrome/metalic look to my primitives.

    For testing this I use the teapot with spheremapping and a light source with specular light (1.0, 1.0, 1.0, 1.0).

    I know the problem occurs with modulate (multiply) current drawing color by the texture image color.

    Also I fixed this limitation by drawing the scene twice - once without texturing to get specular highlights and once with the textures to get the final scene.

    This works great on my GeForce2 Ultra, but on S3 Graphics Savage/IX 1014 (8MB) there are problems.

    The teapot has highlights but some triangles are black. It seams like normals are switched.

    I know the Savage chip is very slow and low-cost. But this is why I use spheremapping to get also on such cards chrome/metalic look. Technics like BRDF sure do not work on such cards.

    I tried also SuperBibles chap8/specular example. This has the same problem.

    Here my snipped code:
    ...
    glDisable(GL_TEXTURE_2D);
    glDisable(GL_BLEND);
    glDisable(GL_TEXTURE_GEN_S);
    glDisable(GL_TEXTURE_GEN_T);

    drawTeapot(); // first draw

    glEnable(GL_TEXTURE_2D);
    glEnable(GL_BLEND);
    glBlendFunc(GL_ONE, GL_ONE);
    glEnable(GL_TEXTURE_GEN_S);
    glEnable(GL_TEXTURE_GEN_T);
    glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
    glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
    glBindTexture(GL_TEXTURE_2D, m_textureList[0]);

    drawTeapot(); // second draw
    ...

    Thanks for all answers

    Bye

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2004
    Location
    Germany
    Posts
    7

    Re: Spheremapping + specular highlights problem !

    I solved myself ! Alpha-Channel was disabled

Similar Threads

  1. Problem With Location of Specular Highlights
    By Carmine in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-22-2012, 11:13 AM
  2. Possible to reflect specular highlights?
    By PickleWorld in forum OpenGL: Advanced Coding
    Replies: 12
    Last Post: 04-16-2005, 03:57 PM
  3. fog and specular highlights problem
    By Phoenix in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 07-17-2002, 01:43 AM
  4. problem on specular highlights
    By Dong Ke in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-11-2001, 02:28 PM
  5. Specular Highlights
    By qwert in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 08-23-2001, 07:02 AM

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