How the alpha value should be interpreted for partial coverage.
More...
How the alpha value should be interpreted for partial coverage.
This must be kept in sync with AlphaFilter.glsl
- See also
- UniversalMaterial
◆ Value
Enumerator |
---|
DETECT | Used by UniversalMaterial to specify a default behavior: - use BLEND for surfaces with some 0.0 < alpha < 1.0 - use ONE for surfaces with all alpha = 1.0.
- use BINARY for surfaces with both alpha = 0 and alpha = 1 at locations, but no intermediate values
|
ONE | Treat the surface as completely covered, forcing alpha = 1.0 everywhere.
|
BINARY | Alpha is rounded per sample before being applied.
Alpha >= 0.5 is rendered, alpha < 0.5 is discarded. This enables faster deferred shading and more accurate post-processing because the surface can be exactly represented in the GBuffer. It creates some aliasing on surface edges, however.
|
COVERAGE_MASK | Convert alpha to coverage values using glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB) .
Requires a MSAA framebuffer to be bound. Not currently supported by UniversalSurface. See http://www.dhpoware.com/samples/glMultiSampleAntiAliasing.html for an example.
|
BLEND | Render surfaces with partial coverage from back to front, using Porter and Duff's OVER operator.
This leaves the depth buffer inconsistent with the color buffer and requires a sort, but often gives the best appearance. Even surfaces with a binary alpha cutout can benefit from blending because the transition under minification or magnification between alpha = 0 and alpha = 1 will create fractional values.
|
◆ AlphaFilter() [1/6]
◆ AlphaFilter() [2/6]
G3D::AlphaFilter::AlphaFilter |
( |
const G3D::Any & |
a | ) |
|
|
inlineexplicit |
◆ AlphaFilter() [3/6]
G3D::AlphaFilter::AlphaFilter |
( |
char |
v | ) |
|
|
inlineexplicit |
◆ AlphaFilter() [4/6]
G3D::AlphaFilter::AlphaFilter |
( |
| ) |
|
|
inline |
◆ AlphaFilter() [5/6]
G3D::AlphaFilter::AlphaFilter |
( |
const Value |
v | ) |
|
|
inline |
◆ AlphaFilter() [6/6]
G3D::AlphaFilter::AlphaFilter |
( |
int |
v | ) |
|
|
inlineexplicit |
◆ classname()
static const char* G3D::AlphaFilter::classname |
( |
| ) |
|
|
inlinestatic |
◆ count()
static int G3D::AlphaFilter::count |
( |
| ) |
|
|
inlinestatic |
◆ deserialize()
◆ hashCode()
unsigned int G3D::AlphaFilter::hashCode |
( |
| ) |
const |
|
inline |
◆ nthValue()
static Value G3D::AlphaFilter::nthValue |
( |
int |
n | ) |
|
|
inlinestatic |
◆ operator int()
G3D::AlphaFilter::operator int |
( |
| ) |
const |
|
inline |
◆ operator!=() [1/2]
bool G3D::AlphaFilter::operator!= |
( |
const AlphaFilter |
other | ) |
const |
|
inline |
◆ operator!=() [2/2]
◆ operator+()
AlphaFilter G3D::AlphaFilter::operator+ |
( |
const int |
x | ) |
const |
|
inline |
◆ operator++()
◆ operator+=()
AlphaFilter& G3D::AlphaFilter::operator+= |
( |
const int |
x | ) |
|
|
inline |
◆ operator-()
AlphaFilter G3D::AlphaFilter::operator- |
( |
const int |
x | ) |
const |
|
inline |
◆ operator--()
◆ operator-=()
AlphaFilter& G3D::AlphaFilter::operator-= |
( |
const int |
x | ) |
|
|
inline |
◆ operator<() [1/2]
bool G3D::AlphaFilter::operator< |
( |
const Value |
other | ) |
const |
|
inline |
◆ operator<() [2/2]
bool G3D::AlphaFilter::operator< |
( |
const AlphaFilter |
other | ) |
const |
|
inline |
◆ operator<=() [1/2]
bool G3D::AlphaFilter::operator<= |
( |
const AlphaFilter |
other | ) |
const |
|
inline |
◆ operator<=() [2/2]
bool G3D::AlphaFilter::operator<= |
( |
const Value |
other | ) |
const |
|
inline |
◆ operator=()
◆ operator==() [1/2]
◆ operator==() [2/2]
bool G3D::AlphaFilter::operator== |
( |
const AlphaFilter |
other | ) |
const |
|
inline |
◆ operator>() [1/2]
bool G3D::AlphaFilter::operator> |
( |
const AlphaFilter |
other | ) |
const |
|
inline |
◆ operator>() [2/2]
bool G3D::AlphaFilter::operator> |
( |
const Value |
other | ) |
const |
|
inline |
◆ operator>=() [1/2]
bool G3D::AlphaFilter::operator>= |
( |
const AlphaFilter |
other | ) |
const |
|
inline |
◆ operator>=() [2/2]
bool G3D::AlphaFilter::operator>= |
( |
const Value |
other | ) |
const |
|
inline |
◆ serialize()
◆ toAny()
G3D::Any G3D::AlphaFilter::toAny |
( |
| ) |
const |
|
inline |
◆ toString() [1/2]
const char* G3D::AlphaFilter::toString |
( |
| ) |
const |
|
inline |
◆ toString() [2/2]
static const char* G3D::AlphaFilter::toString |
( |
int |
i, |
|
|
Value & |
v |
|
) |
| |
|
inlinestatic |
◆ value