Go to the documentation of this file.
6 #include "../../colormap.h"
22 #define float local_real_t
23 #include "../../../../shaders/glsl/IDL_CB-RdYiBu.frag"
44 return std::string(
"CB-RdYiBu");
50 return std::string(
"IDL");
57 "float colormap_red(float x) {\n"
58 " if (x < 0.09790863520700754) {\n"
59 " return 5.14512820512820E+02 * x + 1.64641025641026E+02;\n"
60 " } else if (x < 0.2001887081633112) {\n"
61 " return 2.83195402298854E+02 * x + 1.87288998357964E+02;\n"
62 " } else if (x < 0.3190117539655621) {\n"
63 " return 9.27301587301214E+01 * x + 2.25417989417999E+02;\n"
64 " } else if (x < 0.500517389125164) {\n"
66 " } else if (x < 0.6068377196788788) {\n"
67 " return -3.04674876847379E+02 * x + 4.07495073891681E+02;\n"
68 " } else if (x < 0.9017468988895416) {\n"
69 " return (1.55336390191951E+02 * x - 7.56394659038288E+02) * x + "
70 "6.24412733169483E+02;\n"
72 " return -1.88350769230735E+02 * x + 2.38492307692292E+02;\n"
76 "float colormap_green(float x) {\n"
77 " if (x < 0.09638568758964539) {\n"
78 " return 4.81427692307692E+02 * x + 4.61538461538488E-01;\n"
79 " } else if (x < 0.4987066686153412) {\n"
80 " return ((((3.25545903568267E+04 * x - 4.24067109461319E+04) * x + "
81 "1.83751375886345E+04) * x - 3.19145329617892E+03) * x + 8.08315127034676E+02) "
82 "* x - 1.44611527812961E+01;\n"
83 " } else if (x < 0.6047312345537269) {\n"
84 " return -1.18449917898218E+02 * x + 3.14234811165860E+02;\n"
85 " } else if (x < 0.7067635953426361) {\n"
86 " return -2.70822112753102E+02 * x + 4.06379036672115E+02;\n"
88 " return (-4.62308723214883E+02 * x + 2.42936159122279E+02) * x + "
89 "2.74203431802418E+02;\n"
93 "float colormap_blue(float x) {\n"
94 " if (x < 0.09982818011951204) {\n"
95 " return 1.64123076923076E+01 * x + 3.72646153846154E+01;\n"
96 " } else if (x < 0.2958717460833126) {\n"
97 " return 2.87014675052409E+02 * x + 1.02508735150248E+01;\n"
98 " } else if (x < 0.4900527540014758) {\n"
99 " return 4.65475113122167E+02 * x - 4.25505279034673E+01;\n"
100 " } else if (x < 0.6017014681258838) {\n"
101 " return 5.61032967032998E+02 * x - 8.93789173789407E+01;\n"
102 " } else if (x < 0.7015737100463595) {\n"
103 " return -1.51655677655728E+02 * x + 3.39446886446912E+02;\n"
104 " } else if (x < 0.8237156500567735) {\n"
105 " return -2.43405347593559E+02 * x + 4.03816042780725E+02;\n"
107 " return -3.00296889157305E+02 * x + 4.50678495922638E+02;\n"
111 "vec4 colormap(float x) {\n"
112 " float r = clamp(colormap_red(x) / 255.0, 0.0, 1.0);\n"
113 " float g = clamp(colormap_green(x) / 255.0, 0.0, 1.0);\n"
114 " float b = clamp(colormap_blue(x) / 255.0, 0.0, 1.0);\n"
115 " 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 getTitle() const override
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string getSource() const override