Support Forum       G3D Web Page     
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
G3D::DepthReadMode Class Reference

A m_depth texture can automatically perform the m_depth comparison used for shadow mapping on a texture lookup. More...

Public Types

enum  Value {
  DEPTH_NORMAL = 0,
  DEPTH_LEQUAL = 1,
  DEPTH_GEQUAL = 2
}
 Don't use this enum; use InterpolateMode instances instead. More...
 

Public Member Functions

 DepthReadMode (const G3D::String &x)
 
 DepthReadMode (char v)
 
 DepthReadMode (int v)
 
 DepthReadMode (const G3D::Any &a)
 
 DepthReadMode ()
 
 DepthReadMode (const Value v)
 
void deserialize (G3D::BinaryInput &b)
 
unsigned int hashCode () const
 
 operator int () const
 
bool operator!= (const DepthReadMode ::Value other) const
 
bool operator!= (const DepthReadMode other) const
 
DepthReadMode operator+ (const int x) const
 
DepthReadModeoperator++ ()
 
DepthReadModeoperator+= (const int x)
 
DepthReadMode operator- (const int x) const
 
DepthReadModeoperator-- ()
 
DepthReadModeoperator-= (const int x)
 
bool operator< (const DepthReadMode other) const
 
bool operator< (const Value other) const
 
bool operator<= (const Value other) const
 
bool operator<= (const DepthReadMode other) const
 
DepthReadModeoperator= (const G3D::Any &a)
 
bool operator== (const DepthReadMode ::Value other) const
 
bool operator== (const DepthReadMode other) const
 
bool operator> (const DepthReadMode other) const
 
bool operator> (const Value other) const
 
bool operator>= (const DepthReadMode other) const
 
bool operator>= (const Value other) const
 
void serialize (G3D::BinaryOutput &b) const
 
G3D::Any toAny () const
 
const char * toString () const
 

Static Public Member Functions

static const char * classname ()
 
static int count ()
 
static Value nthValue (int n)
 
static const char * toString (int i, Value &v)
 

Public Attributes

enum G3D::DepthReadMode::Value value
 

Detailed Description

A m_depth texture can automatically perform the m_depth comparison used for shadow mapping on a texture lookup.

The result of a texture lookup is thus the shadowed amount (which will be percentage closer filtered on newer hardware) and not the actual m_depth from the light's point of view.

This combines GL_TEXTURE_COMPARE_MODE_ARB and GL_TEXTURE_COMPARE_FUNC_ARB from http://www.nvidia.com/dev_content/nvopenglspecs/GL_ARB_shadow.txt

For best results on percentage closer hardware (GeForceFX and Radeon9xxx or better), create shadow maps as m_depth textures with BILINEAR_NO_MIPMAP sampling.

See also G3D::RenderDevice::configureShadowMap and the Collision_Demo.

Member Enumeration Documentation

◆ Value

Don't use this enum; use InterpolateMode instances instead.

Enumerator
DEPTH_NORMAL 
DEPTH_LEQUAL 
DEPTH_GEQUAL 

Constructor & Destructor Documentation

◆ DepthReadMode() [1/6]

G3D::DepthReadMode::DepthReadMode ( const G3D::String x)
inlineexplicit

◆ DepthReadMode() [2/6]

G3D::DepthReadMode::DepthReadMode ( const G3D::Any a)
inlineexplicit

◆ DepthReadMode() [3/6]

G3D::DepthReadMode::DepthReadMode ( char  v)
inlineexplicit

◆ DepthReadMode() [4/6]

G3D::DepthReadMode::DepthReadMode ( )
inline

◆ DepthReadMode() [5/6]

G3D::DepthReadMode::DepthReadMode ( const Value  v)
inline

◆ DepthReadMode() [6/6]

G3D::DepthReadMode::DepthReadMode ( int  v)
inlineexplicit

Member Function Documentation

◆ classname()

static const char* G3D::DepthReadMode::classname ( )
inlinestatic

◆ count()

static int G3D::DepthReadMode::count ( )
inlinestatic

◆ deserialize()

void G3D::DepthReadMode::deserialize ( G3D::BinaryInput b)
inline

◆ hashCode()

unsigned int G3D::DepthReadMode::hashCode ( ) const
inline

◆ nthValue()

static Value G3D::DepthReadMode::nthValue ( int  n)
inlinestatic

◆ operator int()

G3D::DepthReadMode::operator int ( ) const
inline

◆ operator!=() [1/2]

bool G3D::DepthReadMode::operator!= ( const DepthReadMode  other) const
inline

◆ operator!=() [2/2]

bool G3D::DepthReadMode::operator!= ( const DepthReadMode ::Value  other) const
inline

◆ operator+()

DepthReadMode G3D::DepthReadMode::operator+ ( const int  x) const
inline

◆ operator++()

DepthReadMode& G3D::DepthReadMode::operator++ ( )
inline

◆ operator+=()

DepthReadMode& G3D::DepthReadMode::operator+= ( const int  x)
inline

◆ operator-()

DepthReadMode G3D::DepthReadMode::operator- ( const int  x) const
inline

◆ operator--()

DepthReadMode& G3D::DepthReadMode::operator-- ( )
inline

◆ operator-=()

DepthReadMode& G3D::DepthReadMode::operator-= ( const int  x)
inline

◆ operator<() [1/2]

bool G3D::DepthReadMode::operator< ( const Value  other) const
inline

◆ operator<() [2/2]

bool G3D::DepthReadMode::operator< ( const DepthReadMode  other) const
inline

◆ operator<=() [1/2]

bool G3D::DepthReadMode::operator<= ( const DepthReadMode  other) const
inline

◆ operator<=() [2/2]

bool G3D::DepthReadMode::operator<= ( const Value  other) const
inline

◆ operator=()

DepthReadMode& G3D::DepthReadMode::operator= ( const G3D::Any a)
inline

◆ operator==() [1/2]

bool G3D::DepthReadMode::operator== ( const DepthReadMode ::Value  other) const
inline

◆ operator==() [2/2]

bool G3D::DepthReadMode::operator== ( const DepthReadMode  other) const
inline

◆ operator>() [1/2]

bool G3D::DepthReadMode::operator> ( const DepthReadMode  other) const
inline

◆ operator>() [2/2]

bool G3D::DepthReadMode::operator> ( const Value  other) const
inline

◆ operator>=() [1/2]

bool G3D::DepthReadMode::operator>= ( const DepthReadMode  other) const
inline

◆ operator>=() [2/2]

bool G3D::DepthReadMode::operator>= ( const Value  other) const
inline

◆ serialize()

void G3D::DepthReadMode::serialize ( G3D::BinaryOutput b) const
inline

◆ toAny()

G3D::Any G3D::DepthReadMode::toAny ( ) const
inline

◆ toString() [1/2]

static const char* G3D::DepthReadMode::toString ( int  i,
Value v 
)
inlinestatic

◆ toString() [2/2]

const char* G3D::DepthReadMode::toString ( ) const
inline

Member Data Documentation

◆ value

enum G3D::DepthReadMode::Value G3D::DepthReadMode::value

documentation generated on Wed Nov 24 2021 08:01:54 using doxygen 1.8.15