List of all members.
Detailed Description
This single-pass effect implements a sort of anisotropic lighting that replaces the standard OpenGL lighting model. 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.
Constructor & Destructor Documentation
osgFX::AnisotropicLighting::AnisotropicLighting |
( |
) |
|
virtual osgFX::AnisotropicLighting::~AnisotropicLighting |
( |
) |
[inline, protected, virtual] |
Member Function Documentation
bool osgFX::AnisotropicLighting::define_techniques |
( |
) |
[protected, virtual] |
abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect. You will usually call addTechnique() inside this method.
Implements osgFX::Effect.
osg::Image * osgFX::AnisotropicLighting::getLightingMap |
( |
) |
[inline] |
const osg::Image * osgFX::AnisotropicLighting::getLightingMap |
( |
) |
const [inline] |
get the const lighting map
int osgFX::AnisotropicLighting::getLightNumber |
( |
) |
const [inline] |
get the OpenGL light number
osgFX::AnisotropicLighting::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" |
|
|
) |
| |
void osgFX::AnisotropicLighting::setLightingMap |
( |
osg::Image * |
image ) |
[inline] |
void osgFX::AnisotropicLighting::setLightNumber |
( |
int |
n ) |
[inline] |
The documentation for this class was generated from the following file: