VolumeViz/vvizfnc_vert.h File Reference

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)

Function Documentation

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.

schema_slices.jpg
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:

  • 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
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.


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

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.


Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/