-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contrast-linear-ocio.expr.nk
33 lines (32 loc) · 1.36 KB
/
contrast-linear-ocio.expr.nk
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
set cut_paste_input [stack 0]
version 13.1 v3
push $cut_paste_input
Expression {
temp_name0 signR
temp_expr0 "r<0 ? -1 : 1"
temp_name1 signG
temp_expr1 "g<0 ? -1 : 1"
temp_name2 signB
temp_expr2 "b<0 ? -1 : 1"
expr0 "pow(abs(r / p), contrast.r) * p * signR"
expr1 "pow(abs(g / p), contrast.g) * p * signG"
expr2 "pow(abs(b / p), contrast.b) * p * signB"
name contrastLinearOcio
selected true
xpos -128
ypos -75
addUserKnob {20 User}
addUserKnob {19 contrast R 0 5}
contrast 1.0
addUserKnob {7 pivot}
pivot 0.18
addUserKnob {7 p t "actual pivot used"}
p {{"0.18 * pow(2, pivot)"}}
addUserKnob {20 About}
addUserKnob {26 toolName l name T OCIOContrastLinear}
addUserKnob {26 toolVersion l version T 1.0.1}
addUserKnob {26 toolAuthor l author T "<a style=\"color: rgb(200,200,200);\" href=\"https://mrlixm.github.io/\">Liam Collod</a>"}
addUserKnob {26 toolDescription l description T "Contrast on linear encoding based on OCIO implementation."}
addUserKnob {26 toolUrl l url T "<a style=\"color: rgb(200,200,200);\" href=\"https://github.com/MrLixm/Foundry_Nuke\">https://github.com/MrLixm/Foundry_Nuke</a>"}
addUserKnob {26 toolRef l "Reference" +STARTLINE T "<h2>Formula</h2>\n<p><em>src\\OpenColorIO\\ops\\gradingprimary\\GradingPrimaryOpCPU.cpp#L180</em></p>\n<h2>Pivot</h2>\n<p><em>src\\OpenColorIO\\ops\\gradingprimary\\GradingPrimary.cpp#L194</em></p>"}
}