VTK  9.3.0
vtkToneMappingPass.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
38#ifndef vtkToneMappingPass_h
39#define vtkToneMappingPass_h
40
42#include "vtkRenderingOpenGL2Module.h" // For export macro
43
44VTK_ABI_NAMESPACE_BEGIN
48
49class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
50{
51public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
59 void Render(const vtkRenderState* s) override;
60
65
67
73
77 enum
78 {
79 Clamp = 0,
80 Reinhard = 1,
81 Exponential = 2,
82 GenericFilmic = 3
83 };
84
86
90 vtkSetClampMacro(ToneMappingType, int, 0, 3);
91 vtkGetMacro(ToneMappingType, int);
93
95
99 vtkGetMacro(Exposure, float);
100 vtkSetMacro(Exposure, float);
102
104
108 vtkSetClampMacro(Contrast, float, 0.0001f, VTK_FLOAT_MAX);
109 vtkGetMacro(Contrast, float);
111
113
118 vtkSetClampMacro(Shoulder, float, 0.0001, 1.f);
119 vtkGetMacro(Shoulder, float);
121
123
127 vtkSetClampMacro(MidIn, float, 0.0001, 1.f);
128 vtkGetMacro(MidIn, float);
130
132
136 vtkSetClampMacro(MidOut, float, 0.0001, 1.f);
137 vtkGetMacro(MidOut, float);
139
141
145 vtkSetClampMacro(HdrMax, float, 1.f, VTK_FLOAT_MAX);
146 vtkGetMacro(HdrMax, float);
148
150
154 vtkSetMacro(UseACES, bool);
155 vtkGetMacro(UseACES, bool);
157
158protected:
161
165 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
166 vtkTextureObject* ColorTexture = nullptr;
167 vtkOpenGLQuadHelper* QuadHelper = nullptr;
168
169 vtkMTimeType PreComputeMTime = 0;
170
171 int ToneMappingType = GenericFilmic;
172 float Exposure = 1.0;
173
177 float Contrast = 1.6773;
178 float Shoulder = 0.9714;
179 float MidIn = 0.18;
180 float MidOut = 0.18;
181 float HdrMax = 11.0785;
182 bool UseACES = true;
183
187 bool UseACESChangeValue = true;
188
194 float ClippingPoint = 1.117427;
195 float ToeSpeed = 0.244676;
196
201
202private:
203 vtkToneMappingPass(const vtkToneMappingPass&) = delete;
204 void operator=(const vtkToneMappingPass&) = delete;
205};
206
207VTK_ABI_NAMESPACE_END
208#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition vtkIndent.h:38
Internal class which encapsulates OpenGL FramebufferObject.
Class to make rendering a full screen quad easier.
Context in which a vtkRenderPass will render.
abstracts an OpenGL texture object.
Implement a post-processing Tone Mapping.
~vtkToneMappingPass() override
void Render(const vtkRenderState *s) override
Perform rendering according to a render state.
void PreComputeAnchorCurveGenericFilmic()
Pre compute ClippingPoint and ToeSpeed.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkToneMappingPass()=default
static vtkToneMappingPass * New()
void SetGenericFilmicDefaultPresets()
Set function to set uncharted 2 presets, and default presets.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
void SetGenericFilmicUncharted2Presets()
Set function to set uncharted 2 presets, and default presets.
window superclass for vtkRenderWindow
Definition vtkWindow.h:34
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_FLOAT_MAX
Definition vtkType.h:152