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

Go to the source code of this file.

Functions

vec4 VVizOverOperator (vec4 underCol, vec4 overCol)
 Blend 2 colors using the over operator, result color is not alpha premultiplied.
 
float VVizGetLuminance (VVIZ_DATATYPE data)
 Compute the luminance of a voxel value.
 
vec3 VVizGetNearestCoord (in VVizVoxelInfo voxelInfo)
 Returns virtual coordinates of nearest voxel center, taking in account current voxel resolution.
 
vec3 VVizGetNearestCoord (in VVizDataSetId dataset, in VVizVoxelInfo voxelInfo)
 Returns virtual coordinates of nearest voxel center, taking in account current voxel resolution.
 
vec3 VVizComputePreintegratedGradient (vec3 tcoord0, vec3 tcoord1)
 Returns the gradient at the center of the two slices.
 
vec3 VVizComputePreintegratedGradient (VVizDataSetId tex, vec3 tcoord0, vec3 tcoord1)
 
vec3 VVizComputePreintegratedGradient (VVizDataSetId tex, inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack)
 
vec3 VVizComputeNormal (vec3 view, vec3 grad)
 Returns the current normal.
 
vec3 VVizComputeNormal (vec3 view, vec3 grad, float gradNorm)
 
vec3 VVizComputeNormal (vec3 tcoordVirt)
 Compute normal in surface of 2D shapes (slices, volumeGeometry, volumeSkin, hzighfield) at given coordinates.
 
vec3 VVizComputeNormal (in VVizDataSetId dataset, vec3 tcoordVirt)
 Compute normal in surface of 2D shapes (slices, volumeGeometry, volumeSkin, hzighfield) at given coordinates.
 
vec4 VVizComputeIsoMaterial (VVizDataSetId tex, in VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int maskId)
 Returns the color of the lighted pixel belonging to the isosurface.
 
vec4 VVizComputePreIntegrated (VVIZ_DATATYPE sf, VVIZ_DATATYPE sb)
 Convert the volume data values (sf, sb) to a color by lookup in the pre-integrated table.
 
vec4 VVizComputePreIntegrated (VVIZ_DATATYPE sf, VVIZ_DATATYPE sb, int mask)
 
vec4 VVizComputePreIntegrated (inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int mask)
 
vec4 VVizComputeVolumeRendering (VVIZ_DATATYPE sf)
 Returns the conversion of the volume data value sf to color by lookup in the colormap.
 
vec4 VVizComputeVolumeRendering (inout VVizVoxelInfo voxelInfoFront, int mask)
 
vec4 VVizComputeVolumeRendering (VVIZ_DATATYPE sf, int tfId)
 
vec2 VVizComputeDiffuseAndSpecularCoeffs (vec3 normal, float gradLength, float threshold, vec3 lightVec, vec3 halfVec, float shininess)
 
vec3 VVizApplySurfaceScalarInternal (vec3 baseColor, vec3 lightedColor, float gradLength)
 
vec3 VVizApplySurfaceScalar (vec3 baseColor, vec3 lightedColor, float gradLength)
 
vec4 VVizComputeVolumeRenderingLighting (in vec4 col, in vec3 normal, in float gradLength)
 Add lighting to the color col.
 
vec4 VVizComputeVolumeRenderingLighting (in VVizDataSetId dataset, in vec4 col, in vec3 normal, in float gradLength)
 Add lighting to the color col.
 
vec4 VVizComputePreintegratedLighting (in vec4 col, in vec3 normal, in float gradLength)
 Add lighting to the color col in the case of pre-integrated rendering.
 
vec4 VVizComputePreintegratedLighting (in VVizDataSetId dataset, in vec4 col, in vec3 normal, in float gradLength)
 Add lighting to the color col in the case of pre-integrated rendering.
 
vec3 VVizComputeViewVec ()
 Returns the current viewing vector in the model space of the default dataset.
 
vec3 VVizComputeViewVec (in VVizDataSetId dataset)
 Returns the current viewing vector in the model space of the given dataset.
 
bool VVizIsOutsideTexture (in vec3 tcoord)
 
bool VVizIsOutsideVolume (in vec3 tcoord)
 
bool VVizIsOutsideOrOnVolumeBorder (in vec3 tcoord)
 True if tcoord is on the volume's boundary voxel or out of the volume.
 
bool VVizIsOutsideOrOnVolumeBorder (in VVizDataSetId dataset, in vec3 tcoord)
 True if tcoord is on the volume's boundary voxel or out of the volume.
 
VVIZ_DATATYPE VVizGetDataPhysicalLod (sampler3D tex, vec3 tcoord, float lod)
 Sample texture without converting from virtual to physical texture coords.
 
VVIZ_DATATYPE VVizGetDataPhysicalLod (sampler2D tex, vec2 tcoord, float lod)
 Sample texture without converting from virtual to physical texture coords.
 
VVIZ_DATATYPE VVizGetDataPhysicalLod (VVizDataSetId dataSet, vec3 tcoord, float lod)
 Sample dataset without converting from virtual to physical texture coords.
 
float VVizGetProjectedDepth (in vec3 tcoord)
 Return depth in screen space (range [0, 1].
 
float VVizGetProjectedDepth (in VVizDataSetId dataset, in vec3 tcoord)
 Return depth in screen space (range [0, 1].
 
vec2 VVizGetScreenCoord ()
 Return screen coordinates (range [0, 1]) of current fragment center.
 
bool VVizIsTransparent (in float alphaValue)
 Return true if alphaValue is considered as fully transparent.
 
bool VVizIsOpaque (in float alphaValue)
 Return true if alphaValue is considered as fully opaque.
 
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.
 
vec4 VVizTextureLod (sampler2D tex, vec3 tcoord, float mipLevel)
 Helper function to fetch a texel at a specific LOD.
 
vec4 VVizGetColor (VVizDataSetId dataset, in vec3 viewVec, in vec3 rayDir, inout VVizVoxelInfo voxel, in VVizVoxelInfo previousVoxel)
 
void VVizComputeGradientCommon (in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal)
 Computes gradient and normal values at the given texture coordinates.
 
void VVizComputeGradientCommon (VVizDataSetId dataset, in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal)
 Computes gradient and normal values for the given dataset at the given texture coordinates.
 

Function Documentation

◆ VVizApplySurfaceScalar()

vec3 VVizApplySurfaceScalar ( vec3  baseColor,
vec3  lightedColor,
float  gradLength 
)

◆ VVizApplySurfaceScalarInternal()

vec3 VVizApplySurfaceScalarInternal ( vec3  baseColor,
vec3  lightedColor,
float  gradLength 
)

◆ VVizComputeDiffuseAndSpecularCoeffs()

vec2 VVizComputeDiffuseAndSpecularCoeffs ( vec3  normal,
float  gradLength,
float  threshold,
vec3  lightVec,
vec3  halfVec,
float  shininess 
)

◆ VVizComputeNormal()

vec3 VVizComputeNormal ( vec3  view,
vec3  grad,
float  gradNorm 
)

◆ VVizComputePreIntegrated() [1/2]

vec4 VVizComputePreIntegrated ( inout VVizVoxelInfo  voxelInfoFront,
in VVizVoxelInfo  voxelInfoBack,
int  mask 
)

◆ VVizComputePreIntegrated() [2/2]

vec4 VVizComputePreIntegrated ( VVIZ_DATATYPE  sf,
VVIZ_DATATYPE  sb,
int  mask 
)

◆ VVizComputePreintegratedGradient() [1/2]

vec3 VVizComputePreintegratedGradient ( VVizDataSetId  tex,
inout VVizVoxelInfo  voxelInfoFront,
in VVizVoxelInfo  voxelInfoBack 
)

◆ VVizComputePreintegratedGradient() [2/2]

vec3 VVizComputePreintegratedGradient ( VVizDataSetId  tex,
vec3  tcoord0,
vec3  tcoord1 
)

◆ VVizComputeVolumeRendering() [1/2]

vec4 VVizComputeVolumeRendering ( inout VVizVoxelInfo  voxelInfoFront,
int  mask 
)

◆ VVizComputeVolumeRendering() [2/2]

vec4 VVizComputeVolumeRendering ( VVIZ_DATATYPE  sf,
int  tfId 
)

◆ VVizGetColor()

vec4 VVizGetColor ( VVizDataSetId  dataset,
in vec3  viewVec,
in vec3  rayDir,
inout VVizVoxelInfo  voxel,
in VVizVoxelInfo  previousVoxel 
)

◆ VVizGetDataPhysicalLod() [1/3]

VVIZ_DATATYPE VVizGetDataPhysicalLod ( sampler2D  tex,
vec2  tcoord,
float  lod 
)

Sample texture without converting from virtual to physical texture coords.

◆ VVizGetDataPhysicalLod() [2/3]

VVIZ_DATATYPE VVizGetDataPhysicalLod ( sampler3D  tex,
vec3  tcoord,
float  lod 
)

Sample texture without converting from virtual to physical texture coords.

◆ VVizGetDataPhysicalLod() [3/3]

VVIZ_DATATYPE VVizGetDataPhysicalLod ( VVizDataSetId  dataSet,
vec3  tcoord,
float  lod 
)

Sample dataset without converting from virtual to physical texture coords.

◆ VVizGetProjectedDepth() [1/2]

float VVizGetProjectedDepth ( in vec3  tcoord)

Return depth in screen space (range [0, 1].

0 is nearClip, 1 is farClip) of the specified virtual space coordinate.

This method is for the default DataSet. For a specific dataset, see VVizGetProjectedDepth(in VVizDataSetId, in vec3)

◆ VVizGetProjectedDepth() [2/2]

float VVizGetProjectedDepth ( in VVizDataSetId  dataset,
in vec3  tcoord 
)

Return depth in screen space (range [0, 1].

0 is nearClip, 1 is farClip) of the specified virtual space coordinate.

◆ VVizGetScreenCoord()

vec2 VVizGetScreenCoord ( )

Return screen coordinates (range [0, 1]) of current fragment center.

Note that if using lowResScale the center of the corresponding FULL resolution fragment is returned. This can be useful when using screen space effects (like depth peeling) to retrieve the value of the current fragment.

◆ VVizIsOpaque()

bool VVizIsOpaque ( in float  alphaValue)

Return true if alphaValue is considered as fully opaque.

◆ VVizIsOutsideOrOnVolumeBorder() [1/2]

bool VVizIsOutsideOrOnVolumeBorder ( in vec3  tcoord)

True if tcoord is on the volume's boundary voxel or out of the volume.

This method is for the default DataSet. For a specific dataset, see VVizIsOutsideOrOnVolumeBorder(in VVizDataSetId, in vec3)

◆ VVizIsOutsideOrOnVolumeBorder() [2/2]

bool VVizIsOutsideOrOnVolumeBorder ( in VVizDataSetId  dataset,
in vec3  tcoord 
)

True if tcoord is on the volume's boundary voxel or out of the volume.

◆ VVizIsOutsideTexture()

bool VVizIsOutsideTexture ( in vec3  tcoord)

◆ VVizIsOutsideVolume()

bool VVizIsOutsideVolume ( in vec3  tcoord)

◆ VVizIsTransparent()

bool VVizIsTransparent ( in float  alphaValue)

Return true if alphaValue is considered as fully transparent.

◆ VVizTextureLod() [1/3]

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

Helper function to fetch a texel at a specific LOD.

◆ VVizTextureLod() [2/3]

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

Helper function to fetch a texel at a specific LOD.

◆ VVizTextureLod() [3/3]

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

Helper function to fetch a texel at a specific LOD.