Bump mapping light

Post: #1
How I can move the light source of the ATI_text_fragment_shader Bumpmapping?
I have to move it in the shading program or in the app code? Wacko
Quote this message in a reply
Post: #2
I have readed the apple DOT3 example. Seems like the function glMultMatrixf change the light direction. But how glMultMatrixf work?
Quote this message in a reply
Post: #3
There's lots of useful OpenGL information in the Redbook; an out-of-date but still useful version is available at the bottom of the page here:

Quote this message in a reply
Post: #4
glMultMatrixf is a way to directly change the current matrix stack, either the model-view or the projection matrix, depending on what is current. It is a direct route to matrix alteration, as compared to the indirect -- though probably more useful, and apparently these days equally efficient -- approach of calling glTranslatef(), glScalef(), and glRotatef().

The pros will correct me if I'm wrong, but as far as I know, you change the light(s) location(s) in the usual way. The light energy on the surface originates at your OpenGL light sources (you know, LIGHT0, LIGHT1, LIGHT2). So you do not have to use shaders.

Change the light by using glLightfv(GL_LIGHT*, GL_POSITION, light_positition). light_position is an array of four GLfloats, corresponding to the light's position in object co-ordinates. "This location is transformed by the modelview matrix and stored in eye coordinates." (Red Book, page 187).
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Transforming directional light to eye space in GLSL Coyote 4 9,464 Dec 8, 2009 03:16 PM
Last Post: Coyote
  OpenGL Blending for 2D Light Effects metacollin 10 18,629 Jun 6, 2009 12:51 AM
Last Post: NelsonMandella
  light attenuation NelsonMandella 2 5,297 Jun 4, 2009 03:28 PM
Last Post: reubert
  2d light shadows KiroNeem 2 4,537 Sep 9, 2005 01:12 PM
Last Post: KiroNeem
  DOT3 Bump (Normal)Mapping Example isgoed 5 12,175 Apr 11, 2005 12:09 AM
Last Post: isgoed