Go to the documentation of this file.
6 #include "../../colormap.h"
22 #define float local_real_t
23 #include "../../../../shaders/glsl/IDL_Hue_Sat_Value_1.frag"
44 return std::string(
"Hue_Sat_Value_1");
50 return std::string(
"IDL");
57 "float colormap_low(float x) {\n"
58 " return (3.31549320112257E-06 * x + 9.90093135228017E-01) * x - "
59 "2.85569629002368E-01;\n"
62 "float colormap_r2(float x) {\n"
63 " float t = x - 172.2021990097892;\n"
64 " return (-2.39029325463818E-02 * t + 2.98715296752437E+00) * t + "
68 "float colormap_g1(float x) {\n"
69 " float t = x - 86.01791713538523;\n"
70 " return (-2.29102048531908E-02 * t + 4.93089581616270E+00) * t + "
74 "float colormap_g2(float x) {\n"
75 " float t = x - 215.6804047700857;\n"
76 " return ((-2.84214232291614E-04 * t + 3.97502254733824E-02) * t - "
77 "1.21659773743153E+00) * t + 255.0;\n"
80 "float colormap_b2(float x) {\n"
81 " float t = x - 129.1625547389263;\n"
82 " return (2.47358957372179E-02 * t - 3.03236899995258E+00) * t + 255.0;\n"
85 "float colormap_red(float x) {\n"
86 " if (x < 43.15291462916737) {\n"
88 " } else if (x < 86.01791713538523) {\n"
89 " return (2.31649880284905E-02 * x - 6.92920742890475E+00) * x + "
90 "5.09541054138852E+02; // R1\n"
91 " } else if (x < 172.2021990097892) {\n"
92 " return colormap_low(x);\n"
93 " } else if (x < 215.6804047700857) {\n"
94 " return colormap_r2(x);\n"
100 "float colormap_green(float x) {\n"
101 " if (x < 86.01791713538523) {\n"
102 " return colormap_low(x);\n"
103 " } else if (x < 129.1625547389263) {\n"
104 " return colormap_g1(x);\n"
105 " } else if (x < 215.6804047700857) {\n"
108 " return colormap_g2(x);\n"
112 "float colormap_blue(float x) {\n"
113 " if (x < 43.15291462916737) {\n"
114 " return (-2.29056417125175E-02 * x + 6.89833449327894E+00) * x - "
115 "2.89480825884616E-02; // B1\n"
116 " } else if (x < 129.1625547389263) {\n"
118 " } else if (x < 172.2021990097892) {\n"
119 " return colormap_b2(x);\n"
121 " return colormap_low(x);\n"
126 "// => [x=43.15291462916737,x=258.0102040408121]\n"
129 "// => [x=86.01791713538523,x=255.8961027639475]\n"
132 "// => [x=129.1625547389263,x=258.1003299995292]\n"
135 "// => [x=172.2021990097892,x=248.7957319298701]\n"
138 "// => [x=215.6804047700857,x=253.6941391396688]\n"
140 "// low(86.01791713538523) = 84.9047112396\n"
141 "// low(172.2021990097892) = 170.308961782\n"
143 "vec4 colormap(float x) {\n"
144 " float t = x * 255.0;\n"
145 " float r = clamp(colormap_red(t) / 255.0, 0.0, 1.0);\n"
146 " float g = clamp(colormap_green(t) / 255.0, 0.0, 1.0);\n"
147 " float b = clamp(colormap_blue(t) / 255.0, 0.0, 1.0);\n"
148 " return vec4(r, g, b, 1.0);\n"
std::string getCategory() const override
uint32_t Color
RGBA color.
Color getColor(double x) const override
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