This file contains method to redifing when using the GET_DATA_FUNCTION slot. More...
Go to the source code of this file.
Defines | |
#define | VVizDefaultData VVIZ_DATATYPE(0.0) |
Functions | |
VVIZ_DATATYPE | VVizGetData (in VVizDataSetId dataset, in vec3 dataCoord) |
VVIZ_DATATYPE | VVizGetRawData (in VVizDataSetId dataset, in vec3 dataCoord) |
This file contains method to redifing when using the GET_DATA_FUNCTION slot.
Definition in file vvizGetData_frag.h.
#define VVizDefaultData VVIZ_DATATYPE(0.0) |
Default voxel value returned by VolumeViz shaders when no data is available.
VVIZ_DATATYPE VVizGetData | ( | in VVizDataSetId | dataset, | |
in vec3 | dataCoord | |||
) |
SoVolumeShader::GET_DATA_FUNCTION function.
Applications can replace this method to customize the SoVolumeShader::GET_DATA_FUNCTION shader stage.
NOTE: On the GPU, voxel values are always returned as a normalized value in the range 0..1. If the actual voxel value is needed, the shader function must compute that value using the current data range (see SoDataRange). The application must explicitly pass the current data range to the shader function as a uniform parameter.
dataset | The dataset to read | |
dataCoord | Uniform data coordinates in volume space. |
VVIZ_DATATYPE VVizGetRawData | ( | in VVizDataSetId | dataset, | |
in vec3 | dataCoord | |||
) |
Default SoVolumeShader::GET_DATA_FUNCTION function.
Method to access dataset, that can be used by VVizGetData custom implementation. It may apply different interpolation (linear, cubix, trilinear, multi-sample12) depending on SoVolumeRenderingQuality and SoVolumeRender nodes setup.
NOTE: On the GPU, voxel values are always returned as a normalized value in the range 0..1. If the actual voxel value is needed, the shader function must compute that value using the current data range (see SoDataRange). The application must explicitly pass the current data range to the shader function as a uniform parameter.
dataset | The dataset to read | |
dataCoord | uniform data coordinates in volume space. |