mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Change layer thickness colormap to parula-like (https://es.mathworks.com/help/matlab/ref/parula.html)
This commit is contained in:
parent
0fbcd2d2ec
commit
0328050548
2 changed files with 13 additions and 9 deletions
|
@ -54,9 +54,13 @@ vertex41core =
|
|||
vec4 layerThicknessGradientColor(float abs_value, float min_value, float max_value)
|
||||
{
|
||||
float value = (abs_value - min_value)/(max_value - min_value);
|
||||
float red = max(2*value-1, 0);
|
||||
float green = 1-abs(1-2*value);
|
||||
float blue = max(1-2*value, 0);
|
||||
float red = min(max(4*value-2, 0), 1);
|
||||
float green = min(1.5*value, 0.75);
|
||||
if (value > 0.75)
|
||||
{
|
||||
green = value;
|
||||
}
|
||||
float blue = 0.75-abs(0.25-value);
|
||||
return vec4(red, green, blue, 1.0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue