This file contains various utility method. More...
Go to the source code of this file.
Functions | |
void | VVizOIV6VertexCompatibility () |
vec4 | VVizGenerateVertex () |
vec3 | VVizTexGen (vec4 vert) |
vec3 | VVizTexGenVol (vec4 vert) |
vec3 | VVizComputeViewDir () |
void | VVizComputeBackSliceTexCoordPerspective () |
void | VVizComputeBackSliceTexCoordOrtho () |
void | VVizComputeBackSliceTexCoord () |
void | VVizComputeFrontSliceTexCoord () |
void | VVizComputeLightingVectorsNoMultiVolume () |
void | VVizComputeLightingVectorsMultiVolume () |
void | VVizComputeLightingVectorsPerspective () |
void | VVizComputeLightingVectorsOrthoNoMultiVolume () |
void | VVizComputeLightingVectorsOrthoMultiVolume () |
void | VVizComputeTangentToEyeSpaceMatrix () |
void | VVizComputeLightingVectorsOrtho () |
void | VVizComputeLightingVectors () |
vec4 | VVizTextureLod (sampler3D tex, vec3 tcoord, float mipLevel) |
vec4 | VVizTextureLod (sampler2D tex, vec2 tcoord, float mipLevel) |
float | VVizGetLuminance (VVIZ_DATATYPE data) |
This file contains various utility method.
Definition in file vvizfnc_vert.h.
void VVizComputeBackSliceTexCoord | ( | ) |
Puts the texture coordinates of the back slice into gl_TexCoord[1].
These coordinates allow you to retrieve the volume data which is in the alignment of the eye and the front slice volume data. In the picture below, the texture coordinates of Sf will be in gl_TexCoord[0] and those of Sb in gl_TexCoord[1]. This function only works in view-aligned slice mode.
void VVizComputeBackSliceTexCoordOrtho | ( | ) |
Same as VVizComputeBackSliceTexCoord but with an orthographic camera.
void VVizComputeBackSliceTexCoordPerspective | ( | ) |
void VVizComputeFrontSliceTexCoord | ( | ) |
Puts the texture coordinates of the front slice into gl_TexCoord[0].
These coordinates are used for indexing the volume data texture.
void VVizComputeLightingVectors | ( | ) |
Computes the following lighting vectors:
The first directional light found in the scene graph is used for this computation.
void VVizComputeLightingVectorsMultiVolume | ( | ) |
void VVizComputeLightingVectorsNoMultiVolume | ( | ) |
void VVizComputeLightingVectorsOrtho | ( | ) |
Same as VVizComputeLightingVectors but with an orthographic camera.
void VVizComputeLightingVectorsOrthoMultiVolume | ( | ) |
void VVizComputeLightingVectorsOrthoNoMultiVolume | ( | ) |
void VVizComputeLightingVectorsPerspective | ( | ) |
void VVizComputeTangentToEyeSpaceMatrix | ( | ) |
This function must be called in your vertex main function if you are using bump mapping node.
vec3 VVizComputeViewDir | ( | ) |
vec4 VVizGenerateVertex | ( | ) |
Returns the current vertex being processed.
When SoVolumeRender::gpuVertexGen field is set to true, it generates the slice's vertex, otherwise it returns gl_Vertex. It should be the first function called in the main vertex shader.
float VVizGetLuminance | ( | VVIZ_DATATYPE | data | ) |
Compute the luminance of a voxel value.
data | value to convert |
void VVizOIV6VertexCompatibility | ( | ) |
Set VVizVertex to gl_Vertex for compatibility with OIV6.
Must be called by all OIV6 functions using VVizVertex
vec3 VVizTexGen | ( | vec4 | vert | ) |
Computes object linear texture coordinates using planes defined by VolumeViz in texture unit 0.
Texture coordinates computed are relative to the current tile. These coordinates are normally used in the fragment shader to look up the voxel data value for the current fragment.
vec3 VVizTexGenVol | ( | vec4 | vert | ) |
Computes object linear texture coordinates using planes defined by VolumeViz in texture unit 1.
Texture coordinates computed are relative to the entire volume. These coordinates may be used in a fragment shader when the position of the voxel in the volume is needed. The volume dimensions in voxels are available to the shader in the (vec3) VVizVolumeDimensions uniform parameter.
vec4 VVizTextureLod | ( | sampler2D | tex, | |
vec2 | tcoord, | |||
float | mipLevel | |||
) |
Helper function to fetch a texel at a specific LOD.
vec4 VVizTextureLod | ( | sampler3D | tex, | |
vec3 | tcoord, | |||
float | mipLevel | |||
) |
Helper function to fetch a texel at a specific LOD.