-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathACES_LMT_OFX.dctl
41 lines (33 loc) · 903 Bytes
/
ACES_LMT_OFX.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
30
31
32
33
34
35
36
37
38
39
40
41
// ACES 1.3 LMT OFX DCTL
// Input is ACEScct
// Output is ACEScct
DEFINE_UI_PARAMS(Exposure, Exposure, DCTLUI_SLIDER_FLOAT, 0, -6, 6, 0.001)
DEFINE_UI_PARAMS(p_LMT, LMT, DCTLUI_COMBO_BOX, 0, { LMT_OFF, BLUEFIX, PFE, BLEACH, GAMUTCOMPRESS }, { off, blue fix, pfe, bleach, gamut compress })
#include "ACES_LIB.h"
__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 aces = make_float3(p_R, p_G, p_B);
aces = ACEScct_to_ACES(aces);
if (Exposure != 0.0f) {
aces.x *= _exp2f(Exposure);
aces.y *= _exp2f(Exposure);
aces.z *= _exp2f(Exposure);
}
switch (p_LMT){
case LMT_OFF:
{}
break;
case BLUEFIX:
{aces = LMT_BlueLightArtifactFix(aces);}
break;
case PFE:
{aces = LMT_PFE(aces);}
break;
case BLEACH:
{aces = LMT_Bleach(aces);}
break;
case GAMUTCOMPRESS:
{aces = LMT_GamutCompress(aces);}}
aces = ACES_to_ACEScct(aces);
return aces;
}