Encoding of the depth buffer (not the GBuffer::Field::CS_Z buffer)
More...
Encoding of the depth buffer (not the GBuffer::Field::CS_Z buffer)
◆ Value
Enumerator |
---|
HYPERBOLIC | "Z-buffer" Traditional (n)/(f-n) * (1 - f/z) encoding.
Easy to produce from a projection matrix, few good numerical properties.
|
LINEAR | "W-buffer" (z-n)/(f-n), provides uniform precision for fixed point formats like DEPTH24, and easy to reconstruct csZ directly from the depth buffer.
Poor precision under floating-point formats.
Accomplished using a custom vertex shader at the expense of complicated interpolation in the fragment shader and losing hierarchical and early-z culling; not possible with a projection matrix.
This is provided for future compatibility with potential OpenGL extensions and for software renderers. There is no way to make G3D render a LINEAR depth buffer currently.
|
COMPLEMENTARY | (n)/(f-n) * (f/z-1) encoding, good for floating-point formats like DEPTH32F.
Accomplished using glDepthRange(1.0f, 0.0f) with a traditionl projection matrix.
- Referenced Code: http://portal.acm.org/citation.cfm?id=311579&dl=ACM&coll=DL&CFID=28183902&CFTOKEN=63987370
|
◆ DepthEncoding() [1/6]
G3D::DepthEncoding::DepthEncoding |
( |
const G3D::String & |
x | ) |
|
|
inlineexplicit |
◆ DepthEncoding() [2/6]
G3D::DepthEncoding::DepthEncoding |
( |
const G3D::Any & |
a | ) |
|
|
inlineexplicit |
◆ DepthEncoding() [3/6]
G3D::DepthEncoding::DepthEncoding |
( |
char |
v | ) |
|
|
inlineexplicit |
◆ DepthEncoding() [4/6]
G3D::DepthEncoding::DepthEncoding |
( |
| ) |
|
|
inline |
◆ DepthEncoding() [5/6]
G3D::DepthEncoding::DepthEncoding |
( |
const Value |
v | ) |
|
|
inline |
◆ DepthEncoding() [6/6]
G3D::DepthEncoding::DepthEncoding |
( |
int |
v | ) |
|
|
inlineexplicit |
◆ classname()
static const char* G3D::DepthEncoding::classname |
( |
| ) |
|
|
inlinestatic |
◆ count()
static int G3D::DepthEncoding::count |
( |
| ) |
|
|
inlinestatic |
◆ deserialize()
◆ hashCode()
unsigned int G3D::DepthEncoding::hashCode |
( |
| ) |
const |
|
inline |
◆ nthValue()
static Value G3D::DepthEncoding::nthValue |
( |
int |
n | ) |
|
|
inlinestatic |
◆ operator int()
G3D::DepthEncoding::operator int |
( |
| ) |
const |
|
inline |
◆ operator!=() [1/2]
bool G3D::DepthEncoding::operator!= |
( |
const DepthEncoding |
other | ) |
const |
|
inline |
◆ operator!=() [2/2]
◆ operator+()
◆ operator++()
◆ operator+=()
◆ operator-()
◆ operator--()
◆ operator-=()
◆ operator<() [1/2]
bool G3D::DepthEncoding::operator< |
( |
const Value |
other | ) |
const |
|
inline |
◆ operator<() [2/2]
bool G3D::DepthEncoding::operator< |
( |
const DepthEncoding |
other | ) |
const |
|
inline |
◆ operator<=() [1/2]
bool G3D::DepthEncoding::operator<= |
( |
const DepthEncoding |
other | ) |
const |
|
inline |
◆ operator<=() [2/2]
bool G3D::DepthEncoding::operator<= |
( |
const Value |
other | ) |
const |
|
inline |
◆ operator=()
◆ operator==() [1/2]
◆ operator==() [2/2]
bool G3D::DepthEncoding::operator== |
( |
const DepthEncoding |
other | ) |
const |
|
inline |
◆ operator>() [1/2]
bool G3D::DepthEncoding::operator> |
( |
const DepthEncoding |
other | ) |
const |
|
inline |
◆ operator>() [2/2]
bool G3D::DepthEncoding::operator> |
( |
const Value |
other | ) |
const |
|
inline |
◆ operator>=() [1/2]
bool G3D::DepthEncoding::operator>= |
( |
const DepthEncoding |
other | ) |
const |
|
inline |
◆ operator>=() [2/2]
bool G3D::DepthEncoding::operator>= |
( |
const Value |
other | ) |
const |
|
inline |
◆ serialize()
◆ toAny()
G3D::Any G3D::DepthEncoding::toAny |
( |
| ) |
const |
|
inline |
◆ toString() [1/2]
static const char* G3D::DepthEncoding::toString |
( |
int |
i, |
|
|
Value & |
v |
|
) |
| |
|
static |
◆ toString() [2/2]
const char* G3D::DepthEncoding::toString |
( |
| ) |
const |
|
inline |
◆ value