Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ShUtil::ShKernelLight Class Reference

List of all members.

Static Public Member Functions

template<typename T>
static ShProgram pointLight ()
 Omnidirectional light program IN(0) T lightColor - color;.
template<typename T>
static ShProgram spotLight ()
 Spotlight program linear falloff from (lightVec | lightDir) == -1 to -cos(fallofAngle).
template<typename T>
static ShProgram texLight2D (const ShBaseTexture2D< T > &tex)
 2D-Textured light program

Detailed Description

Definition at line 37 of file ShKernelLight.hpp.


Member Function Documentation

template<typename T>
ShProgram ShUtil::ShKernelLight::pointLight  )  [static]
 

Omnidirectional light program IN(0) T lightColor - color;.

OUT(0) T irrad - irradiance

Definition at line 41 of file ShKernelLightImpl.hpp.

References SH_BEGIN_PROGRAM, SH_DECL, and SH_END.

template<typename T>
ShProgram ShUtil::ShKernelLight::spotLight  )  [static]
 

Spotlight program linear falloff from (lightVec | lightDir) == -1 to -cos(fallofAngle).

Takes a gradient direction and applies IN(0) T lightColor - color; IN(1) ShAttrib1f falloff - angle in radians where spotlight intensity begins to go to 0 IN(0) ShAttrib1f lightAngle - angle in radians where spotlight intensity = 0 IN(2) ShVector3f lightDir - light direction (VCS)

The following usually comes from shVsh IN(3) ShPoint3f lightVec - light vector at surface point (VCS)

OUT(0) T irrad - irradiance

Definition at line 50 of file ShKernelLightImpl.hpp.

References SH::cos(), SH::normalize(), SH_BEGIN_PROGRAM, SH_DECL, and SH_END.

template<typename T>
ShProgram ShUtil::ShKernelLight::texLight2D const ShBaseTexture2D< T > &  tex  )  [static]
 

2D-Textured light program

Takes as input IN(0) ShAttrib1f scaling - scaling on the texture (tiles texture) IN(1) ShAttrib1f lightAngle - angle in radians for fov of light IN(2) ShVector3f lightDir - direction light faces (VCS) IN(3) ShVector3f lightUp - up direction of light, must be orthogonal to lightDir (VCS)

The following typically come from shVsh IN(3) ShVector3f lightVec - light vector at surface point (VCS)

OUT(0) T irrad - irradiance

Definition at line 74 of file ShKernelLightImpl.hpp.

References SH::cross(), SH::frac(), SH::normalize(), SH_BEGIN_PROGRAM, SH_DECL, and SH_END.


The documentation for this class was generated from the following files:
Generated on Thu Jul 28 17:37:49 2005 for Sh by  doxygen 1.4.3-20050530