44 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
76#if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
112#if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
135vec2 VVizComputeDiffuseAndSpecularCoeffs(vec3 normal,
float gradLength,
float threshold, vec3 lightVec, vec3 halfVec,
float shininess);
136vec3 VVizApplySurfaceScalarInternal(vec3 baseColor, vec3 lightedColor,
float gradLength);
137vec3 VVizApplySurfaceScalar(vec3 baseColor, vec3 lightedColor,
float gradLength);
190bool VVizIsOutsideTexture(in vec3 tcoord);
192bool VVizIsOutsideVolume(in vec3 tcoord);
201bool VVizIsOutsideOrOnVolumeBorder(in vec3 tcoord);
204bool VVizIsOutsideOrOnVolumeBorder(in VVizDataSetId dataset, in vec3 tcoord);
207VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler3D tex, vec3 tcoord,
float lod);
210VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler2D tex, vec2 tcoord,
float lod);
213VVIZ_DATATYPE VVizGetDataPhysicalLod(VVizDataSetId dataSet, vec3 tcoord,
float lod);
222float VVizGetProjectedDepth(in vec3 tcoord);
228float VVizGetProjectedDepth(in VVizDataSetId dataset, in vec3 tcoord);
236vec2 VVizGetScreenCoord();
238#if defined(VVIZ_NUM_CLIPPING_PLANES)
245bool VVizIsClippedByPlane(in vec3 tcoord);
248bool VVizIsClippedByPlane(in VVizDataSetId dataset, in vec3 tcoord);
252bool VVizIsTransparent(in
float alphaValue);
255bool VVizIsOpaque(in
float alphaValue);
258vec4 VVizTextureLod(sampler3D tex, vec3 tcoord,
float mipLevel);
261vec4 VVizTextureLod(sampler2D tex, vec2 tcoord,
float mipLevel);
264vec4 VVizTextureLod(sampler2D tex, vec3 tcoord,
float mipLevel);
266vec4 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.
float VVizGetLuminance(VVIZ_DATATYPE data)
Compute the luminance of a voxel value.
vec4 VVizOverOperator(vec4 underCol, vec4 overCol)
Blend 2 colors using the over operator, result color is not alpha premultiplied.
vec4 VVizComputeVolumeRendering(VVIZ_DATATYPE sf)
Returns the conversion of the volume data value sf to color by lookup in the colormap.
vec3 VVizGetNearestCoord(in VVizVoxelInfo voxelInfo)
Returns virtual coordinates of nearest voxel center, taking in account current voxel resolution.
vec4 VVizComputeVolumeRenderingLighting(in vec4 col, in vec3 normal, in float gradLength)
Add lighting to the color col.
vec3 VVizComputePreintegratedGradient(vec3 tcoord0, vec3 tcoord1)
Returns the gradient at the center of the two slices.
vec3 VVizComputeNormal(vec3 view, vec3 grad)
Returns the current normal.
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 VVizComputePreIntegrated(VVIZ_DATATYPE sf, VVIZ_DATATYPE sb)
Convert the volume data values (sf, sb) to a color by lookup in the pre-integrated table.
vec3 VVizComputeViewVec()
Returns the current viewing vector in the model space of the default dataset.
vec4 VVizComputeIsoMaterial(VVizDataSetId tex, in VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int maskId)
Returns the color of the lighted pixel belonging to the isosurface.
Defines voxel state info used with the VolumeViz Shader Library API.