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
00039 vec4 VVizOverOperator(vec4 underCol, vec4 overCol);
00040
00046 float VVizGetLuminance(VVIZ_DATATYPE data);
00047
00053 vec3 VVizGetNearestCoord(in VVizVoxelInfo voxelInfo);
00054
00058 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00059 vec3 VVizComputePreintegratedGradient(vec3 tcoord0, vec3 tcoord1);
00060 vec3 VVizComputePreintegratedGradient(VVizDataSetId tex, vec3 tcoord0, vec3 tcoord1);
00061 vec3 VVizComputePreintegratedGradient(VVizDataSetId tex, inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack);
00062 #endif
00063
00067 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00068 vec3 VVizComputeNormal(vec3 view, vec3 grad);
00069 vec3 VVizComputeNormal(vec3 view, vec3 grad, float gradNorm);
00070 #endif
00071
00077 vec3 VVizComputeNormal(vec3 tcoordVirt);
00078
00088 #if VVIZ_SHAPE_TYPE == VVIZ_VRENDER
00089 vec4 VVizComputeIsoMaterial(VVizDataSetId tex, in VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int maskId);
00090 #endif
00091
00098 vec4 VVizComputePreIntegrated(VVIZ_DATATYPE sf, VVIZ_DATATYPE sb);
00099 vec4 VVizComputePreIntegrated(VVIZ_DATATYPE sf, VVIZ_DATATYPE sb, int mask);
00100 vec4 VVizComputePreIntegrated(inout VVizVoxelInfo voxelInfoFront, in VVizVoxelInfo voxelInfoBack, int mask);
00101
00105 vec4 VVizComputeVolumeRendering(VVIZ_DATATYPE sf);
00106 vec4 VVizComputeVolumeRendering(inout VVizVoxelInfo voxelInfoFront, int mask);
00107 vec4 VVizComputeVolumeRendering(VVIZ_DATATYPE sf, int tfId);
00108
00109 vec2 VVizComputeDiffuseAndSpecularCoeffs(vec3 normal, float gradLength, float threshold, vec3 lightVec, vec3 halfVec, float shininess);
00110 vec3 VVizApplySurfaceScalarInternal(vec3 baseColor, vec3 lightedColor, float gradLength);
00111 vec3 VVizApplySurfaceScalar(vec3 baseColor, vec3 lightedColor, float gradLength);
00112
00117 vec4 VVizComputeVolumeRenderingLighting(in vec4 col, in vec3 normal, in float gradLength);
00118
00127 vec4 VVizComputePreintegratedLighting(in vec4 col, in vec3 normal, in float gradLength);
00128
00132 vec3 VVizComputeViewVec();
00133
00134
00135 bool VVizIsOutsideTexture(in vec3 tcoord);
00136
00137 bool VVizIsOutsideVolume(in vec3 tcoord);
00138
00140
00141 bool VVizIsOutsideOrOnVolumeBorder(in vec3 tcoord);
00142
00144 VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler3D tex, vec3 tcoord, float lod);
00145
00147 VVIZ_DATATYPE VVizGetDataPhysicalLod(sampler2D tex, vec2 tcoord, float lod);
00148
00153 float VVizGetProjectedDepth(in vec3 tcoord);
00154
00161 vec2 VVizGetScreenCoord();
00162
00163 #if defined(VVIZ_NUM_CLIPPING_PLANES)
00164 bool VVizIsClippedByPlane(in vec3 tcoord);
00165 #endif
00166
00168 bool VVizIsTransparent(in float alphaValue);
00169
00171 bool VVizIsOpaque(in float alphaValue);
00172
00174 vec4 VVizTextureLod(sampler3D tex, vec3 tcoord, float mipLevel);
00175
00177 vec4 VVizTextureLod(sampler2D tex, vec2 tcoord, float mipLevel);
00178
00180 vec4 VVizTextureLod(sampler2D tex, vec3 tcoord, float mipLevel);
00181
00182 vec4 VVizGetColor(VVizDataSetId dataset, in vec3 viewVec, in vec3 rayDir, inout VVizVoxelInfo voxel, in VVizVoxelInfo previousVoxel);
00183 void VVizComputeGradientCommon(in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal);
00184 void VVizComputeGradientCommon(VVizDataSetId dataset, in vec3 tcoordFront, in vec3 tcoordBack, out vec3 gradient, out vec3 normal);
00185
00186 #endif
00187