Loading...
Searching...
No Matches
gamma.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_GF_GAMMA_H
8#define PXR_BASE_GF_GAMMA_H
9
10#include "pxr/pxr.h"
11#include "pxr/base/gf/api.h"
12
15
16PXR_NAMESPACE_OPEN_SCOPE
17
18class GfVec3f;
19class GfVec3d;
20class GfVec4f;
21class GfVec4d;
22class GfVec3h;
23class GfVec4h;
24
27GF_API
28GfVec3f GfApplyGamma(const GfVec3f &v, double gamma);
29
32GF_API
33GfVec3d GfApplyGamma(const GfVec3d &v, double gamma);
34
36GF_API
37GfVec3h GfApplyGamma(const GfVec3h &v, double gamma);
38
41GF_API
42GfVec4f GfApplyGamma(const GfVec4f &v, double gamma);
43
46GF_API
47GfVec4d GfApplyGamma(const GfVec4d &v, double gamma);
48
50GF_API
51GfVec4h GfApplyGamma(const GfVec4h &v, double gamma);
52
54GF_API
55float GfApplyGamma(const float &v, double gamma);
56
58GF_API
59unsigned char GfApplyGamma(const unsigned char &v, double gamma);
60
62GF_API
64
73GF_API float GfConvertLinearToDisplay(const float &v);
74GF_API unsigned char GfConvertLinearToDisplay(const unsigned char &v);
75
84GF_API float GfConvertDisplayToLinear(const float &v);
85GF_API unsigned char GfConvertDisplayToLinear(const unsigned char &v);
86
87PXR_NAMESPACE_CLOSE_SCOPE
88
89#endif // PXR_BASE_GF_GAMMA_H
Basic type for a vector of 3 double components.
Definition: vec3d.h:46
Basic type for a vector of 3 float components.
Definition: vec3f.h:46
Basic type for a vector of 3 GfHalf components.
Definition: vec3h.h:47
Basic type for a vector of 4 double components.
Definition: vec4d.h:46
Basic type for a vector of 4 float components.
Definition: vec4f.h:46
Basic type for a vector of 4 GfHalf components.
Definition: vec4h.h:47
GF_API double GfGetDisplayGamma()
Return the system display gamma.
GF_API GfVec3f GfConvertLinearToDisplay(const GfVec3f &v)
Given a vec, v, representing an energy-linear RGB(A) color, return a vec of the same type converted t...
GF_API GfVec3f GfConvertDisplayToLinear(const GfVec3f &v)
Given a vec, v, representing an RGB(A) color in the system's display gamma space, return an energy-li...
GF_API GfVec3f GfApplyGamma(const GfVec3f &v, double gamma)
Return a new vector with each component of v raised to the power gamma.