-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathn6Vibrance.dctl
29 lines (23 loc) · 1.19 KB
/
n6Vibrance.dctl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "libLMT.h"
DEFINE_UI_PARAMS(mgl, global, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(my, yellow, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(mr, red, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(mm, magenta, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(mb, blue, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(mc, cyan, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(mg, green, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(mcu, custom, DCTLUI_SLIDER_FLOAT, 0, -1, 1, 0)
DEFINE_UI_PARAMS(cuh, hue, DCTLUI_SLIDER_FLOAT, 100, 0, 360, 0)
DEFINE_UI_PARAMS(cuw, width, DCTLUI_SLIDER_FLOAT, 0.3, 0, 2, 0)
DEFINE_UI_PARAMS(hl, hue-linear, DCTLUI_SLIDER_FLOAT, 0.5, 0, 1, 0)
DEFINE_UI_PARAMS(ze, zone extract, DCTLUI_CHECK_BOX, 1)
DEFINE_UI_PARAMS(zp, zone range, DCTLUI_SLIDER_FLOAT, 0, -4, 4, 0)
DEFINE_UI_PARAMS(zone, zone, DCTLUI_COMBO_BOX, 0, {low, high}, {low, high})
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B)
{
float3 rgb = make_float3(p_R, p_G, p_B);
int zr = 0;
if (zone == high) zr = 1;
rgb = n6_vibrance(rgb, mgl, my, mr, mm, mb, mc, mg, mcu, cuh, cuw, hl, ze, zp, zr);
return rgb;
}