|
Public Member Functions |
| AnisotropicLighting () |
| AnisotropicLighting (const AnisotropicLighting ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) |
| META_Effect (osgFX, AnisotropicLighting,"Anisotropic Lighting","This single-pass effect implements a sort of anisotropic""lighting that replaces the standard OpenGL lighting model.\n""The final color of vertices is not computed directly, it is""the result of a texture lookup on a user-supplied lighting""image map.A vertex program is used to compute the s and t""texture coordinates as follows:s=(N dot H);t=(N dot L)""where N is the vertex normal, L is the light-to-vertex vector,""H is the half-way vector.This is a good example of how you""can use the State::getInitialViewMatrix() method to retrieve""the view matrix and perform view-dependant effects without""fakes of any kind.\n""This effect requires the ARB_vertex_program extension.","Marco Jez") |
osg::Image * | getLightingMap () |
| get the lighting map
|
const osg::Image * | getLightingMap () const |
| get the const lighting map
|
void | setLightingMap (osg::Image *image) |
| set the lighting map
|
int | getLightNumber () const |
| get the OpenGL light number
|
void | setLightNumber (int n) |
| set the OpenGL light number that will be used in lighting computations
|
Protected Member Functions |
virtual | ~AnisotropicLighting () |
AnisotropicLighting & | operator= (const AnisotropicLighting &) |
bool | define_techniques () |
| abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect.
|
The final color of vertices is not computed directly, it is the result of a texture lookup on a user-supplied lighting image map. A vertex program is used to compute the s and t texture coordinates as follows: s = (N dot H) ; t = (N dot L) where N is the vertex normal, L is the light-to-vertex vector, H is the half-way vector. This is a good example of how you can use the State::getInitialViewMatrix() method to retrieve the view matrix and perform view-dependant effects without fakes of any kind. This effect requires the ARB_vertex_program extension.