Loading...
Searching...
No Matches
gamma.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24#ifndef PXR_BASE_GF_GAMMA_H
25#define PXR_BASE_GF_GAMMA_H
26
27#include "pxr/pxr.h"
28#include "pxr/base/gf/api.h"
29
32
33PXR_NAMESPACE_OPEN_SCOPE
34
35class GfVec3f;
36class GfVec3d;
37class GfVec4f;
38class GfVec4d;
39class GfVec3h;
40class GfVec4h;
41
44GF_API
45GfVec3f GfApplyGamma(const GfVec3f &v, double gamma);
46
49GF_API
50GfVec3d GfApplyGamma(const GfVec3d &v, double gamma);
51
53GF_API
54GfVec3h GfApplyGamma(const GfVec3h &v, double gamma);
55
58GF_API
59GfVec4f GfApplyGamma(const GfVec4f &v, double gamma);
60
63GF_API
64GfVec4d GfApplyGamma(const GfVec4d &v, double gamma);
65
67GF_API
68GfVec4h GfApplyGamma(const GfVec4h &v, double gamma);
69
71GF_API
72float GfApplyGamma(const float &v, double gamma);
73
75GF_API
76unsigned char GfApplyGamma(const unsigned char &v, double gamma);
77
79GF_API
81
90GF_API float GfConvertLinearToDisplay(const float &v);
91GF_API unsigned char GfConvertLinearToDisplay(const unsigned char &v);
92
101GF_API float GfConvertDisplayToLinear(const float &v);
102GF_API unsigned char GfConvertDisplayToLinear(const unsigned char &v);
103
104PXR_NAMESPACE_CLOSE_SCOPE
105
106#endif // PXR_BASE_GF_GAMMA_H
Basic type for a vector of 3 double components.
Definition: vec3d.h:63
Basic type for a vector of 3 float components.
Definition: vec3f.h:63
Basic type for a vector of 3 GfHalf components.
Definition: vec3h.h:64
Basic type for a vector of 4 double components.
Definition: vec4d.h:63
Basic type for a vector of 4 float components.
Definition: vec4f.h:63
Basic type for a vector of 4 GfHalf components.
Definition: vec4h.h:64
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.