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
00058 vec3 VVizComputePreintegratedGradient(vec3 tcoord0, vec3 tcoord1);
00059 vec3 VVizComputePreintegratedGradient(VVizDataSetId tex, vec3 tcoord0, vec3 tcoord1);
00060 vec3 VVizComputePreintegratedGradient(VVizDataSetId tex, inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack);
00061 #endif
00062
00068 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00069 vec3 VVizComputeNormal(vec3 view, vec3 grad);
00070 vec3 VVizComputeNormal(vec3 view, vec3 grad, float gradNorm);
00071 #endif
00072
00080 vec3 VVizComputeNormal(vec3 tcoordVirt);
00081
00092 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00093 vec4 VVizComputeIsoMaterial(VVizDataSetId tex, in VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int maskId);
00094 #endif
00095
00103 vec4 VVizComputePreIntegrated(VVIZ_DATATYPE sf, VVIZ_DATATYPE sb);
00104 vec4 VVizComputePreIntegrated(VVIZ_DATATYPE sf, VVIZ_DATATYPE sb, int mask);
00105 vec4 VVizComputePreIntegrated(inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int mask);
00106
00111 vec4 VVizComputeVolumeRendering(VVIZ_DATATYPE sf);
00112 vec4 VVizComputeVolumeRendering(inout VVizVoxelInfo voxelInfoFront, int mask);
00113 vec4 VVizComputeVolumeRendering(VVIZ_DATATYPE sf, int tfId);
00114
00115 vec2 VVizComputeDiffuseAndSpecularCoeffs(vec3 normal, float gradLength, float threshold, vec3 lightVec, vec3 halfVec, float shininess);
00116 vec3 VVizApplySurfaceScalarInternal(vec3 baseColor, vec3 lightedColor, float gradLength);
00117 vec3 VVizApplySurfaceScalar(vec3 baseColor, vec3 lightedColor, float gradLength);
00118
00124 vec4 VVizComputeVolumeRenderingLighting(in vec4 col, in vec3 normal, in float gradLength);
00125
00135 vec4 VVizComputePreintegratedLighting(in vec4 col, in vec3 normal, in float gradLength);
00136
00142 vec3 VVizComputeViewVec();
00143
00144
00145 bool VVizIsOutsideTexture(in vec3 tcoord);
00146
00147 bool VVizIsOutsideVolume(in vec3 tcoord);
00148
00150
00151 bool VVizIsOutsideOrOnVolumeBorder(in vec3 tcoord);
00152
00154 VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler3D tex, vec3 tcoord, float lod);
00155
00157 VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler2D tex, vec2 tcoord, float lod);
00158
00163 float VVizGetProjectedDepth(in vec3 tcoord);
00164
00171 vec2 VVizGetScreenCoord();
00172
00173 #if defined(VVIZ_NUM_CLIPPING_PLANES)
00174 bool VVizIsClippedByPlane(in vec3 tcoord);
00175 #endif
00176
00178 bool VVizIsTransparent(in float alphaValue);
00179
00181 bool VVizIsOpaque(in float alphaValue);
00182
00184 vec4 VVizTextureLod(sampler3D tex, vec3 tcoord, float mipLevel);
00185
00187 vec4 VVizTextureLod(sampler2D tex, vec2 tcoord, float mipLevel);
00188
00190 vec4 VVizTextureLod(sampler2D tex, vec3 tcoord, float mipLevel);
00191
00192 vec4 VVizGetColor(VVizDataSetId dataset, in vec3 viewVec, in vec3 rayDir, inout VVizVoxelInfo voxel, in VVizVoxelInfo previousVoxel);
00193 void VVizComputeGradientCommon(in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal);
00194 void VVizComputeGradientCommon(VVizDataSetId dataset, in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal);
00195
00196 #endif
00197