Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
vvizfnc_vert.h File Reference

Go to the source code of this file.

Functions

void VVizOIV6VertexCompatibility ()
 Set VVizVertex to gl_Vertex for compatibility with OIV6.
 
vec4 VVizGenerateVertex ()
 Returns the current vertex being processed.
 
vec3 VVizTexGen (vec4 vert)
 Computes object linear texture coordinates using planes defined by VolumeViz in texture unit 0.
 
vec3 VVizTexGenVol (vec4 vert)
 Computes object linear texture coordinates using planes defined by VolumeViz in texture unit 1.
 
vec3 VVizComputeViewDir ()
 
void VVizComputeBackSliceTexCoordPerspective ()
 
void VVizComputeBackSliceTexCoordOrtho ()
 Same as VVizComputeBackSliceTexCoord but with an orthographic camera.
 
void VVizComputeBackSliceTexCoord ()
 Puts the texture coordinates of the back slice into gl_TexCoord[1].
 
void VVizComputeFrontSliceTexCoord ()
 Puts the texture coordinates of the front slice into gl_TexCoord[0].
 
void VVizComputeLightingVectorsNoMultiVolume ()
 
void VVizComputeLightingVectorsMultiVolume ()
 
void VVizComputeLightingVectorsPerspective ()
 
void VVizComputeLightingVectorsOrthoNoMultiVolume ()
 
void VVizComputeLightingVectorsOrthoMultiVolume ()
 
void VVizComputeTangentToEyeSpaceMatrix ()
 This function must be called in your vertex main function if you are using bump mapping node.
 
void VVizComputeLightingVectorsOrtho ()
 Same as VVizComputeLightingVectors but with an orthographic camera.
 
void VVizComputeLightingVectors ()
 Computes the following lighting vectors:
 
vec4 VVizTextureLod (sampler3D tex, vec3 tcoord, float mipLevel)
 Helper function to fetch a texel at a specific LOD.
 
vec4 VVizTextureLod (sampler2D tex, vec2 tcoord, float mipLevel)
 Helper function to fetch a texel at a specific LOD.
 
float VVizGetLuminance (VVIZ_DATATYPE data)
 Compute the luminance of a voxel value.
 

Function Documentation

◆ VVizComputeBackSliceTexCoord()

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.

◆ VVizComputeBackSliceTexCoordOrtho()

void VVizComputeBackSliceTexCoordOrtho ( )

Same as VVizComputeBackSliceTexCoord but with an orthographic camera.

◆ VVizComputeBackSliceTexCoordPerspective()

void VVizComputeBackSliceTexCoordPerspective ( )

◆ VVizComputeFrontSliceTexCoord()

void VVizComputeFrontSliceTexCoord ( )

Puts the texture coordinates of the front slice into gl_TexCoord[0].

These coordinates are used for indexing the volume data texture.

◆ VVizComputeLightingVectors()

void VVizComputeLightingVectors ( )

Computes the following lighting vectors:

  • VVizLightingVec: directional light vector in object space. The first directional light found in the scene graph is used for this computation.
  • VVizViewVec: vertex to eye vector in object space
  • VVizHalfVec: half vector in object space (VVizViewVec+VVizLightingVec)/2

◆ VVizComputeLightingVectorsMultiVolume()

void VVizComputeLightingVectorsMultiVolume ( )

◆ VVizComputeLightingVectorsNoMultiVolume()

void VVizComputeLightingVectorsNoMultiVolume ( )

◆ VVizComputeLightingVectorsOrtho()

void VVizComputeLightingVectorsOrtho ( )

Same as VVizComputeLightingVectors but with an orthographic camera.

◆ VVizComputeLightingVectorsOrthoMultiVolume()

void VVizComputeLightingVectorsOrthoMultiVolume ( )

◆ VVizComputeLightingVectorsOrthoNoMultiVolume()

void VVizComputeLightingVectorsOrthoNoMultiVolume ( )

◆ VVizComputeLightingVectorsPerspective()

void VVizComputeLightingVectorsPerspective ( )

◆ VVizComputeTangentToEyeSpaceMatrix()

void VVizComputeTangentToEyeSpaceMatrix ( )

This function must be called in your vertex main function if you are using bump mapping node.

◆ VVizComputeViewDir()

vec3 VVizComputeViewDir ( )

◆ VVizGenerateVertex()

vec4 VVizGenerateVertex ( )

Returns the current vertex being processed.


Returns gl_Vertex. It should be the first function called in the main vertex shader.

◆ VVizOIV6VertexCompatibility()

void VVizOIV6VertexCompatibility ( )

Set VVizVertex to gl_Vertex for compatibility with OIV6.

Must be called by all OIV6 functions using VVizVertex

◆ VVizTexGen()

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.

◆ VVizTexGenVol()

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.

◆ VVizTextureLod() [1/2]

vec4 VVizTextureLod ( sampler2D  tex,
vec2  tcoord,
float  mipLevel 
)

Helper function to fetch a texel at a specific LOD.

◆ VVizTextureLod() [2/2]

vec4 VVizTextureLod ( sampler3D  tex,
vec3  tcoord,
float  mipLevel 
)

Helper function to fetch a texel at a specific LOD.