Go to the documentation of this file.
6 #include "../../colormap.h"
22 #define float local_real_t
23 #include "../../../../shaders/glsl/IDL_Standard_Gamma-II.frag"
44 return std::string(
"Standard_Gamma-II");
50 return std::string(
"IDL");
57 "float colormap_red(float x) {\n"
58 " if (x < (8.75333333333333E+01 + 2.19676470588235E+02) / "
59 "(4.76470588235294E+00 + 1.00000000000000E-01)) { // 63.1507456671\n"
60 " return 4.76470588235294E+00 * x - 2.19676470588235E+02;\n"
61 " } else if (x < (8.75333333333333E+01 + 3.11000000000000E+02) / "
62 "(5.00000000000000E+00 + 1.00000000000000E-01)) { // 78.1437908497\n"
63 " return -1.00000000000000E-01 * x + 8.75333333333333E+01;\n"
64 " } else if (x < (-3.11000000000000E+02 + 3.42345454545455E+02) / "
65 "(5.32727272727273E+00 - 5.00000000000000E+00)) { // 95.7777777778\n"
66 " return 5.00000000000000E+00 * x - 3.11000000000000E+02;\n"
67 " } else if (x < (255.0 + 3.42345454545455E+02) / 5.32727272727273E+00) { "
69 " return 5.32727272727273E+00 * x - 3.42345454545455E+02;\n"
70 " } else if (x < (1.49279020979021E+03 - 255.0) / 7.68531468531468E+00) { "
73 " } else if (x < (1.49279020979021E+03 + 7.19657722738218E+02) / "
74 "(5.10010319917441E+00 + 7.68531468531468E+00)) { // 173.04463198\n"
75 " return -7.68531468531468E+00 * x + 1.49279020979021E+03;\n"
76 " } else if (x < (255.0 + 7.19657722738218E+02) / 5.10010319917441E+00) { "
78 " return 5.10010319917441E+00 * x - 7.19657722738218E+02;\n"
84 "float colormap_green(float x) {\n"
85 " if (x < (163.0 + 5.65896810850440E+02) / 5.07239736070381E+00) { // "
87 " return 5.07239736070381E+00 * x - 5.65896810850440E+02;\n"
88 " } else if (x < (163.0 + 9.06153846153846E+02) / 6.10769230769231E+00) { "
92 " return 6.10769230769231E+00 * x - 9.06153846153846E+02;\n"
96 "float colormap_blue(float x) {\n"
97 " if (x < (5.16164662349676E+02 - 4.77795918367347E+00) / "
98 "(5.20142857142857E+00 + 5.42900092506938E+00)) { // 48.1059305585\n"
99 " return 5.20142857142857E+00 * x + 4.77795918367347E+00;\n"
100 " } else if (x < 5.16164662349676E+02 / 5.42900092506938E+00) { // "
102 " return -5.42900092506938E+00 * x + 5.16164662349676E+02;\n"
103 " } else if (x < 6.16058823529412E+02 / 4.84558823529412E+00) { // "
106 " } else if (x < (9.31184615384615E+02 + 6.16058823529412E+02) / "
107 "(4.84558823529412E+00 + 5.89230769230769E+00)) { // 144.091863932\n"
108 " return 4.84558823529412E+00 * x - 6.16058823529412E+02;\n"
109 " } else if (x < 9.31184615384615E+02 / 5.89230769230769E+00) { // "
111 " return -5.89230769230769E+00 * x + 9.31184615384615E+02;\n"
112 " } else if (x < 5.64142909048289E+02 / 3.22177684013127E+00) { // "
116 " return 3.22177684013127E+00 * x - 5.64142909048289E+02;\n"
120 "vec4 colormap(float x) {\n"
121 " float t = x * 255.0;\n"
122 " float r = clamp(colormap_red(t) / 255.0, 0.0, 1.0);\n"
123 " float g = clamp(colormap_green(t) / 255.0, 0.0, 1.0);\n"
124 " float b = clamp(colormap_blue(t) / 255.0, 0.0, 1.0);\n"
125 " return vec4(r, g, b, 1.0);\n"
Color getColor(double x) const override
std::string getCategory() const override
uint32_t Color
RGBA color.
This file was automatically created with "create_c++_header.sh".
std::string getSource() const override
std::string getTitle() const override
This file offers overloads of toIce() and fromIce() functions for STL container types.