FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
ShaderFieldDefines.hpp
1
5/*****************************************************
6******************* FIELD ARRAY ********************
7******************************************************/
8
9
10
11#define HAVE_AmplitudeField
12
13/* Original field type for AmplitudeField was u_int16_t */
14
15#define IS_INTEGER_AmplitudeField
16
17
18#define TYPEOF_AmplitudeField float
19
20#define IS_SCALAR_AmplitudeField 1
21
22#define MULTIPLICITY_OF_AmplitudeField 1
23
24#define ELEMENT_SIZE_OF_AmplitudeField 2
25
26const int ARRAY_LENGTH_OF_AmplitudeField = 296;
27
28#define FIELD_ARRAY_INDEX_OF_AmplitudeField(VertexIndex, ArrayIndex) (VertexIndex * ARRAY_LENGTH_OF_AmplitudeField + ArrayIndex)
29
30/* Get field array value from array index */
31#define FIELD_ARRAY_VALUE_OF_AmplitudeField(VertexIndex, NormalizedArrayIndex01) texelFetch( AmplitudeField, FIELD_ARRAY_INDEX_OF_AmplitudeField(VertexIndex, NormalizedArrayIndex01) ).r
32
33/* Get field array index from array index scaled between 0.0 and 1.0 */
34#define FIELD_ARRAY_INDEX_OF_AmplitudeField_NORMALIZED01(VertexIndex, NormalizedArrayIndex01) (VertexIndex * ARRAY_LENGTH_OF_AmplitudeField + int(floor( clamp( NormalizedArrayIndex01,0.0, 1.0)*ARRAY_LENGTH_OF_AmplitudeField)) )
35
36/* Get field array value from array index scaled between 0.0 and 1.0 */
37#define FIELD_ARRAY_VALUE_OF_AmplitudeField_NORMALIZED01(VertexIndex, NormalizedArrayIndex01) texelFetch( AmplitudeField, FIELD_ARRAY_INDEX_OF_AmplitudeField_NORMALIZED01(VertexIndex, NormalizedArrayIndex01) ).r
38