![]() |
VR-Forces 5.0.1 Developer's Guide
|
Wrapper around Nvidia Variable Rate Shading Image functionality Creates a texture of the correct size for the provided channel. The texture factors in the shading rate Texel size (typically 16x16). The shading rate image format is R8UI it's texel values are used as lookups in the the currently bound shading rate image palette.

Public Types | |
| typedef std::vector< unsigned char > | VariableRatePixelBuffer |
Public Member Functions | |
| DtVariableRateShadingImage (DtDe &de, DtOsgChannel *channel) | |
| void | initGLObjects (osg::State &state) |
| void | createShadingRateImageTextureForChannel (osg::State &state) |
| unsigned int | imageWidth () const |
| unsigned int | imageHeight () const |
| unsigned int | shadingRateTexelWidth () const |
| unsigned int | shadingRateTexelHeight () const |
| void | useImageData (bool useData) |
| void | dirtyImageData () |
| std::vector < VariableRatePixelBuffer > & | imageData () |
| DtGlRenderTexture * | texture () |
| void | bindShadingImage (osg::State &state) |
| bool | isInitalised () |
| void | reset () |
Static Public Member Functions | |
| static void | populateDataForvated (int width, int height, float centerX, float centerY, VariableRatePixelBuffer &data) |
| static void | populateDataFocusRect (int width, int height, float focusMinX, float focusMinY, float focusMaxX, float focusMaxY, unsigned char focusVal, unsigned char contextVal, VariableRatePixelBuffer &data) |
Protected Member Functions | |
| virtual | ~DtVariableRateShadingImage () |
| void | loadImageData (osg::State &state) |
Private Member Functions | |
| DtVariableRateShadingImage (const DtVariableRateShadingImage &other) | |
| DtVariableRateShadingImage & | operator= (const DtVariableRateShadingImage &other) |
| typedef std::vector<unsigned char> makVrv::DtVariableRateShadingImage::VariableRatePixelBuffer |
|
private |
Copy Constructor not implemented – Copy Not Allowed.
| makVrv::DtVariableRateShadingImage::DtVariableRateShadingImage | ( | DtDe & | de, |
| DtOsgChannel * | channel | ||
| ) |
CTOR.
|
protectedvirtual |
DTOR.
|
private |
Assignment Operator Not implemented – Assignment Not Allowed.
| void makVrv::DtVariableRateShadingImage::initGLObjects | ( | osg::State & | state | ) |
initalise the gl extensions, get the image texel sizes and calculate the image size
| void makVrv::DtVariableRateShadingImage::createShadingRateImageTextureForChannel | ( | osg::State & | state | ) |
create the shading rate image texture with correct dimensions for it's rendertexture accounting for texel sizes
return the texel width of the shading rate texture
return the texel height of the shading rate texture
return the shading rate texel width (number of pixels each texel covers)
return the shading rate texel height (number of pixels each texel covers)
| void makVrv::DtVariableRateShadingImage::useImageData | ( | bool | useData | ) |
should we use the image data array to populate the texture
| void makVrv::DtVariableRateShadingImage::dirtyImageData | ( | ) |
flag the image data is dirty so it gets loaded on next bind call
| std::vector<VariableRatePixelBuffer>& makVrv::DtVariableRateShadingImage::imageData | ( | ) |
return the data used to populate the shading rate texture
| DtGlRenderTexture* makVrv::DtVariableRateShadingImage::texture | ( | ) |
/brief return the texture used as the shading rate image
| void makVrv::DtVariableRateShadingImage::bindShadingImage | ( | osg::State & | state | ) |
bind the shading rate texture
|
inline |
has initGLObject been called and succeeded
|
inline |
reset the initalised state so the image is rebuilt
|
static |
convienince method to create forvated image data, centerX/Y are in normalise coords 0,0 at bottom left
|
static |
convienince method to create focus rect image data, min/max x/y are in normalise coords 0,0 at bottom left.
|
protected |
load the image data into the texture
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |