-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathColorGradeNode.hpp
43 lines (36 loc) · 1.08 KB
/
ColorGradeNode.hpp
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
42
43
#pragma once
#include "cinder/FrameGraph.hpp"
namespace cinder {
namespace frame_graph {
//! A node that provides basic real-time color grading.
//! Inlets except temperature expect values in the range of roughly -2 to +2.
//! 0 means no change, > 0 is more of the effect, and < 0 is less of the effect.
//! Temperature takes degrees Kelvin, and is designed to be used with values
//! between 1000K and 40,000K.
class ColorGradeNode :
public FullScreenQuadRenderer< 1 >,
public Node< Inlets<
gl::Texture2dRef,
float, // exposure
vec3, // lift, gamma, gain
float, // temperature (Kelvin)
float, // contrast
float, // midtone_contrast
vec3 // hue, saturation, value
>, Outlets< gl::Texture2dRef > >
{
public:
enum inlet_names {
first_inlet = 1,
exposure = 1,
LGG,
temperature,
contrast,
midtone_contrast,
HSV,
last_inlet
};
explicit ColorGradeNode( const ci::ivec2 & size );
};
}
}