00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef VVIZFNC_FRAG_H
00025 #define VVIZFNC_FRAG_H
00026
00034 vec4 VVizOverOperator(vec4 underCol, vec4 overCol);
00035
00042 float VVizGetLuminance(VVIZ_DATATYPE data);
00043
00044 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00045
00051 vec3 VVizGetNearestCoord(in VVizVoxelInfo voxelInfo);
00052
00059 vec3 VVizGetNearestCoord(in VVizDataSetId dataset, in VVizVoxelInfo voxelInfo);
00060
00066 vec3 VVizComputePreintegratedGradient(vec3 tcoord0, vec3 tcoord1);
00067 vec3 VVizComputePreintegratedGradient(VVizDataSetId tex, vec3 tcoord0, vec3 tcoord1);
00068 vec3 VVizComputePreintegratedGradient(VVizDataSetId tex, inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack);
00069 #endif
00070
00076 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00077 vec3 VVizComputeNormal(vec3 view, vec3 grad);
00078 vec3 VVizComputeNormal(vec3 view, vec3 grad, float gradNorm);
00079 #endif
00080
00091 vec3 VVizComputeNormal(vec3 tcoordVirt);
00092
00100 vec3 VVizComputeNormal(in VVizDataSetId dataset, vec3 tcoordVirt);
00101
00112 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00113 vec4 VVizComputeIsoMaterial(VVizDataSetId tex, in VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int maskId);
00114 #endif
00115
00123 vec4 VVizComputePreIntegrated(VVIZ_DATATYPE sf, VVIZ_DATATYPE sb);
00124 vec4 VVizComputePreIntegrated(VVIZ_DATATYPE sf, VVIZ_DATATYPE sb, int mask);
00125 vec4 VVizComputePreIntegrated(inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int mask);
00126
00131 vec4 VVizComputeVolumeRendering(VVIZ_DATATYPE sf);
00132 vec4 VVizComputeVolumeRendering(inout VVizVoxelInfo voxelInfoFront, int mask);
00133 vec4 VVizComputeVolumeRendering(VVIZ_DATATYPE sf, int tfId);
00134
00135 vec2 VVizComputeDiffuseAndSpecularCoeffs(vec3 normal, float gradLength, float threshold, vec3 lightVec, vec3 halfVec, float shininess);
00136 vec3 VVizApplySurfaceScalarInternal(vec3 baseColor, vec3 lightedColor, float gradLength);
00137 vec3 VVizApplySurfaceScalar(vec3 baseColor, vec3 lightedColor, float gradLength);
00138
00144 vec4 VVizComputeVolumeRenderingLighting(in vec4 col, in vec3 normal, in float gradLength);
00145
00151 vec4 VVizComputeVolumeRenderingLighting(in VVizDataSetId dataset, in vec4 col, in vec3 normal, in float gradLength);
00152
00162 vec4 VVizComputePreintegratedLighting(in vec4 col, in vec3 normal, in float gradLength);
00163
00173 vec4 VVizComputePreintegratedLighting(in VVizDataSetId dataset, in vec4 col, in vec3 normal, in float gradLength);
00174
00180 vec3 VVizComputeViewVec();
00181
00187 vec3 VVizComputeViewVec(in VVizDataSetId dataset);
00188
00189
00190 bool VVizIsOutsideTexture(in vec3 tcoord);
00191
00192 bool VVizIsOutsideVolume(in vec3 tcoord);
00193
00200
00201 bool VVizIsOutsideOrOnVolumeBorder(in vec3 tcoord);
00202
00204 bool VVizIsOutsideOrOnVolumeBorder(in VVizDataSetId dataset, in vec3 tcoord);
00205
00207 VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler3D tex, vec3 tcoord, float lod);
00208
00210 VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler2D tex, vec2 tcoord, float lod);
00211
00213 VVIZ_DATATYPE VVizGetDataPhysicalLod(VVizDataSetId dataSet, vec3 tcoord, float lod);
00214
00222 float VVizGetProjectedDepth(in vec3 tcoord);
00223
00228 float VVizGetProjectedDepth(in VVizDataSetId dataset, in vec3 tcoord);
00229
00236 vec2 VVizGetScreenCoord();
00237
00238 #if defined(VVIZ_NUM_CLIPPING_PLANES)
00239
00245 bool VVizIsClippedByPlane(in vec3 tcoord);
00246
00248 bool VVizIsClippedByPlane(in VVizDataSetId dataset, in vec3 tcoord);
00249 #endif
00250
00252 bool VVizIsTransparent(in float alphaValue);
00253
00255 bool VVizIsOpaque(in float alphaValue);
00256
00258 vec4 VVizTextureLod(sampler3D tex, vec3 tcoord, float mipLevel);
00259
00261 vec4 VVizTextureLod(sampler2D tex, vec2 tcoord, float mipLevel);
00262
00264 vec4 VVizTextureLod(sampler2D tex, vec3 tcoord, float mipLevel);
00265
00266 vec4 VVizGetColor(VVizDataSetId dataset, in vec3 viewVec, in vec3 rayDir, inout VVizVoxelInfo voxel, in VVizVoxelInfo previousVoxel);
00267
00277 void VVizComputeGradientCommon(in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal);
00278
00285 void VVizComputeGradientCommon(VVizDataSetId dataset, in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal);
00286
00287 #endif
00288