VTK  9.2.6
vtkToneMappingPass.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkToneMappingPass.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
50#ifndef vtkToneMappingPass_h
51#define vtkToneMappingPass_h
52
54#include "vtkRenderingOpenGL2Module.h" // For export macro
55
59
60class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
61{
62public:
65 void PrintSelf(ostream& os, vtkIndent indent) override;
66
70 void Render(const vtkRenderState* s) override;
71
76
78
84
88 enum
89 {
90 Clamp = 0,
91 Reinhard = 1,
92 Exponential = 2,
93 GenericFilmic = 3
94 };
95
97
101 vtkSetClampMacro(ToneMappingType, int, 0, 3);
102 vtkGetMacro(ToneMappingType, int);
104
106
110 vtkGetMacro(Exposure, float);
111 vtkSetMacro(Exposure, float);
113
115
119 vtkSetClampMacro(Contrast, float, 0.0001f, VTK_FLOAT_MAX);
120 vtkGetMacro(Contrast, float);
122
124
129 vtkSetClampMacro(Shoulder, float, 0.0001, 1.f);
130 vtkGetMacro(Shoulder, float);
132
134
138 vtkSetClampMacro(MidIn, float, 0.0001, 1.f);
139 vtkGetMacro(MidIn, float);
141
143
147 vtkSetClampMacro(MidOut, float, 0.0001, 1.f);
148 vtkGetMacro(MidOut, float);
150
152
156 vtkSetClampMacro(HdrMax, float, 1.f, VTK_FLOAT_MAX);
157 vtkGetMacro(HdrMax, float);
159
161
165 vtkSetMacro(UseACES, bool);
166 vtkGetMacro(UseACES, bool);
168
169protected:
172
176 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
177 vtkTextureObject* ColorTexture = nullptr;
178 vtkOpenGLQuadHelper* QuadHelper = nullptr;
179
180 vtkMTimeType PreComputeMTime = 0;
181
182 int ToneMappingType = GenericFilmic;
183 float Exposure = 1.0;
184
188 float Contrast = 1.6773;
189 float Shoulder = 0.9714;
190 float MidIn = 0.18;
191 float MidOut = 0.18;
192 float HdrMax = 11.0785;
193 bool UseACES = true;
194
198 bool UseACESChangeValue = true;
199
205 float ClippingPoint = 1.117427;
206 float ToeSpeed = 0.244676;
207
212
213private:
214 vtkToneMappingPass(const vtkToneMappingPass&) = delete;
215 void operator=(const vtkToneMappingPass&) = delete;
216};
217
218#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition vtkIndent.h:49
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:48
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_FLOAT_MAX
Definition vtkType.h:163