Go to the documentation of this file.
6 #include "../../colormap.h"
22 #define float local_real_t
23 #include "../../../../shaders/glsl/IDL_CB-RdGy.frag"
44 return std::string(
"CB-RdGy");
50 return std::string(
"IDL");
57 "float colormap_f(float x) {\n"
58 " if (x < 0.8110263645648956) {\n"
59 " return (((4.41347880412638E+03 * x - 1.18250308887283E+04) * x + "
60 "1.13092070303101E+04) * x - 4.94879610401395E+03) * x + "
61 "1.10376673162241E+03;\n"
63 " return (4.44045986053970E+02 * x - 1.34196160353499E+03) * x + "
64 "9.26518306556645E+02;\n"
68 "float colormap_red(float x) {\n"
69 " if (x < 0.09384074807167053) {\n"
70 " return 7.56664615384615E+02 * x + 1.05870769230769E+02;\n"
71 " } else if (x < 0.3011957705020905) {\n"
72 " return (-2.97052932130813E+02 * x + 4.43575866219751E+02) * x + "
73 "1.37867123966178E+02;\n"
74 " } else if (x < 0.3963058760920129) {\n"
75 " return 8.61868131868288E+01 * x + 2.18562881562874E+02;\n"
76 " } else if (x < 0.5) {\n"
77 " return 2.19915384615048E+01 * x + 2.44003846153861E+02;\n"
79 " return colormap_f(x);\n"
83 "float colormap_green(float x) {\n"
84 " if (x < 0.09568486400411116) {\n"
85 " return 2.40631111111111E+02 * x + 1.26495726495727E+00;\n"
86 " } else if (x < 0.2945883673263987) {\n"
87 " return 7.00971783488427E+02 * x - 4.27826773670273E+01;\n"
88 " } else if (x < 0.3971604611945229) {\n"
89 " return 5.31775726495706E+02 * x + 7.06051282052287E+00;\n"
90 " } else if (x < 0.5) {\n"
91 " return 3.64925470085438E+02 * x + 7.33268376068493E+01;\n"
93 " return colormap_f(x);\n"
97 "float colormap_blue(float x) {\n"
98 " if (x < 0.09892375498249567) {\n"
99 " return 1.30670329670329E+02 * x + 3.12116402116402E+01;\n"
100 " } else if (x < 0.1985468629735229) {\n"
101 " return 3.33268034188035E+02 * x + 1.11699145299146E+01;\n"
102 " } else if (x < 0.2928770209555256) {\n"
103 " return 5.36891330891336E+02 * x - 2.92588522588527E+01;\n"
104 " } else if (x < 0.4061551302245808) {\n"
105 " return 6.60915763546766E+02 * x - 6.55827586206742E+01;\n"
106 " } else if (x < 0.5) {\n"
107 " return 5.64285714285700E+02 * x - 2.63359683794383E+01;\n"
109 " return colormap_f(x);\n"
113 "vec4 colormap(float x) {\n"
114 " float r = clamp(colormap_red(x) / 255.0, 0.0, 1.0);\n"
115 " float g = clamp(colormap_green(x) / 255.0, 0.0, 1.0);\n"
116 " float b = clamp(colormap_blue(x) / 255.0, 0.0, 1.0);\n"
117 " return vec4(r, g, b, 1.0);\n"
std::string getCategory() const override
std::string getSource() const override
Color getColor(double x) const override
uint32_t Color
RGBA color.
This file was automatically created with "create_c++_header.sh".
std::string getTitle() const override
This file offers overloads of toIce() and fromIce() functions for STL container types.