Support Forum G3D Web Page |
Public Types | |
enum | Channels { RGB, R, G, B, RasL, GasL, BasL, AasL, MeanRGBasL, Luminance } |
Which channels to display. More... | |
Public Member Functions | |
Visualization (Channels c=RGB, float g=1.0f, float mn=0.0f, float mx=1.0f, bool mod1=false, bool motVec=false) | |
Defaults to linear data on [0, 1]: packed normal maps, reflectance maps, etc. More... | |
Visualization (const Any &a) | |
Accepts the name of any static factory method as an Any::ARRAY, e.g., "v = sRGB()" or a table, e.g., "v = Texture::Visualization { documentGamma = 2.2, ... }". More... | |
Matrix4 | colorShiftMatrix () |
Returns the matrix corresponding to the color shift implied by channels. More... | |
bool | operator== (const Visualization &v) const |
void | setShaderArgs (UniformTable &args) |
Sets the following arguments: More... | |
Any | toAny () const |
Static Public Member Functions | |
static const Visualization & | bumpInAlpha () |
For bump map packed in an alpha channel. More... | |
static const Visualization & | defaults () |
static const Visualization & | depthBuffer () |
For a hyperbolic depth map in the red channel (e.g., a shadow map). More... | |
static const Visualization & | linearRGB () |
Linear RGB map. More... | |
static const Visualization & | motionVectors () |
For motion vectors. More... | |
static const Visualization & | packedUnitVector () |
Unit vectors packed into RGB channels, e.g. More... | |
static const Visualization & | radiance () |
Radiance map. More... | |
static const Visualization & | reflectivity () |
Reflectivity map. More... | |
static const Visualization & | sRGB () |
For photographs and other images with document gamma of about 2.2. More... | |
static const Visualization & | textureCoordinates () |
static const Visualization & | unitVector () |
For signed unit vectors, like a GBuffer's normals, on the range [-1, 1] for RGB channels. More... | |
Public Attributes | |
Channels | channels |
float | documentGamma |
Texture's gamma. More... | |
bool | invertIntensity |
If true, show as 1 - (adjusted value) More... | |
int | layer |
For a texture array, the coordinate of the layer to display. More... | |
float | max |
Highest expected value. More... | |
float | min |
Lowest value to visualize. More... | |
int | mipLevel |
The mipLevel to display. More... | |
bool | mod1 = false |
Wrap values at 1 for visualization, intended for texture coordinates. More... | |
float | motionVectorScale = 1.0f |
1.0 = stretch a unit vector to maxMotionVectorLength in the visualization. More... | |
float | motionVectorSpacing = 24.0f |
Tile size for arrow visualization. More... | |
bool | showMotionVectors = false |
Visualize motion vectors/flow. More... | |
Which channels to display.
G3D::Texture::Visualization::Visualization | ( | Channels | c = RGB , |
float | g = 1.0f , |
||
float | mn = 0.0f , |
||
float | mx = 1.0f , |
||
bool | mod1 = false , |
||
bool | motVec = false |
||
) |
Defaults to linear data on [0, 1]: packed normal maps, reflectance maps, etc.
G3D::Texture::Visualization::Visualization | ( | const Any & | a | ) |
Accepts the name of any static factory method as an Any::ARRAY, e.g., "v = sRGB()" or a table, e.g., "v = Texture::Visualization { documentGamma = 2.2, ... }".
|
static |
For bump map packed in an alpha channel.
Matrix4 G3D::Texture::Visualization::colorShiftMatrix | ( | ) |
Returns the matrix corresponding to the color shift implied by channels.
|
static |
Referenced by linearRGB(), packedUnitVector(), radiance(), and reflectivity().
|
static |
For a hyperbolic depth map in the red channel (e.g., a shadow map).
|
inlinestatic |
Linear RGB map.
Same as defaults()
|
static |
For motion vectors.
|
inline |
|
inlinestatic |
Unit vectors packed into RGB channels, e.g.
a normal map. Same as defaults()
|
inlinestatic |
Radiance map.
Same as defaults()
|
inlinestatic |
Reflectivity map.
Same as defaults()
void G3D::Texture::Visualization::setShaderArgs | ( | UniformTable & | args | ) |
Sets the following arguments:
float mipLevel float adjustGamma float bias float scale float invertIntensity mat4 colorShift
macro LAYER
|
static |
For photographs and other images with document gamma of about 2.2.
Note that this does not actually match true sRGB values, which have a non-linear gamma.
|
static |
Any G3D::Texture::Visualization::toAny | ( | ) | const |
|
static |
For signed unit vectors, like a GBuffer's normals, on the range [-1, 1] for RGB channels.
Channels G3D::Texture::Visualization::channels |
Referenced by operator==().
float G3D::Texture::Visualization::documentGamma |
bool G3D::Texture::Visualization::invertIntensity |
If true, show as 1 - (adjusted value)
Referenced by operator==().
int G3D::Texture::Visualization::layer |
For a texture array, the coordinate of the layer to display.
Otherwise just 0.
Referenced by operator==().
float G3D::Texture::Visualization::max |
Highest expected value.
Referenced by operator==().
float G3D::Texture::Visualization::min |
Lowest value to visualize.
Referenced by operator==().
int G3D::Texture::Visualization::mipLevel |
The mipLevel to display.
Referenced by operator==().
bool G3D::Texture::Visualization::mod1 = false |
Wrap values at 1 for visualization, intended for texture coordinates.
Referenced by operator==().
float G3D::Texture::Visualization::motionVectorScale = 1.0f |
1.0 = stretch a unit vector to maxMotionVectorLength in the visualization.
Referenced by operator==().
float G3D::Texture::Visualization::motionVectorSpacing = 24.0f |
Tile size for arrow visualization.
Referenced by operator==().
bool G3D::Texture::Visualization::showMotionVectors = false |
Visualize motion vectors/flow.
Referenced by operator==().