mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-12 19:27:11 +01:00
Fixed color interpolation bug
This commit is contained in:
parent
c6c15a446b
commit
0bc1bd8549
@ -7,7 +7,6 @@
|
|||||||
#include <volk/volk.h>
|
#include <volk/volk.h>
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
#include <utils/color.h>
|
|
||||||
|
|
||||||
float DEFAULT_COLOR_MAP[][3] = {
|
float DEFAULT_COLOR_MAP[][3] = {
|
||||||
{0x00, 0x00, 0x20},
|
{0x00, 0x00, 0x20},
|
||||||
|
@ -41,10 +41,4 @@ namespace color {
|
|||||||
g += m;
|
g += m;
|
||||||
b += m;
|
b += m;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void interpRGB(float ar, float ag, float ab, float br, float bg, float bb, float& or, float& og, float& ob, float ratio) {
|
|
||||||
or = ar + (br - ar) * ratio;
|
|
||||||
og = ag + (bg - ag) * ratio;
|
|
||||||
ob = ab + (bb - ab) * ratio;
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user