| Support Forum Library Source SourceForge Page G3D Web Page |
Names of fields that may be present in a GBuffer. More...
Public Types | |
| enum | Value { WS_NORMAL, CS_NORMAL, WS_FACE_NORMAL, CS_FACE_NORMAL, WS_POSITION, CS_POSITION, LAMBERTIAN, GLOSSY, TRANSMISSIVE, EMISSIVE, CS_POSITION_CHANGE, SS_POSITION_CHANGE, CS_Z, DEPTH_AND_STENCIL, TS_NORMAL, COUNT } |
Public Member Functions | |
| G3D_DECLARE_ENUM_CLASS_METHODS (Field) | |
| bool | isUnitVector () const |
Static Public Member Functions | |
| static const char * | toString (int i, Value &v) |
Public Attributes | |
| enum G3D::GBuffer::Field::Value | value |
Names of fields that may be present in a GBuffer.
These use the abbreviations CS = camera space, WS = world space, SS = screen space, TS = tangent space.
Normals are always encoded as n' = (n+1)/2, even if they are in floating point format, to simplify the implementation of routines that read and write GBuffers.
| WS_NORMAL |
Shading normal, after interpolation and bump-mapping. |
| CS_NORMAL |
Shading normal, after interpolation and bump-mapping. |
| WS_FACE_NORMAL |
Geometric normal of the face, independent of the vertex normals. |
| CS_FACE_NORMAL |
Geometric normal of the face, independent of the vertex normals. |
| WS_POSITION |
Must be a floating-point format. |
| CS_POSITION |
Must be a floating-point format. |
| LAMBERTIAN |
Must be a floating-point or normalized fixed-point format.
|
| GLOSSY |
RGB = magnitude; A = exponent. Fresnel has not been applied. Must be a floating-point or normalized fixed-point format.
|
| TRANSMISSIVE |
Must be a RGBA floating-point or normalized fixed-point format. Index of refraction is in the A channel.
|
| EMISSIVE |
Must be a floating-point or normalized fixed-point format.
|
| CS_POSITION_CHANGE |
World-space position change since the previous frame, according to a Surface. Must be RGB floating-point. The name "velocity" is reserved for future use as
instantaneous velocity.
There is no "WS_POSITION_CHANGE" because there is no
application (for a screen-space buffer of position
changes that don't take the camera's own movement into
account) to justify the added implementation
complexity required for that. |
| SS_POSITION_CHANGE |
Texture storing the screen-space pixel displacement since the previous frame. As a result, floating-point textures will store the sub-pixel displacement and signed integers (e.g., ImageFormat::RG8UI) will round to the nearest pixel. |
| CS_Z |
Camera-space Z. Must be a floating-point, R-only texture. This is always a negative value if a perspective transformation has been applied. |
| DEPTH_AND_STENCIL |
The depth buffer, used for depth write and test. Not camera-space Z. This may include stencil bits. |
| TS_NORMAL |
Shading normal, after interpolation and bump-mapping, in tangent-space. Note that tangent space is based on interpolated vertex normals. If no bump mapping is applied the shading normal will always be (0, 0, 1). |
| COUNT |
Not a valid. |
| G3D::GBuffer::Field::G3D_DECLARE_ENUM_CLASS_METHODS | ( | Field | ) |
|
inline |
| enum G3D::GBuffer::Field::Value G3D::GBuffer::Field::value |
Referenced by G3D::GBuffer::attachmentPoint().
1.8.2