VTK  9.1.0
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=========================================================================*/
77#ifndef vtkToneMappingPass_h
78#define vtkToneMappingPass_h
79
81#include "vtkRenderingOpenGL2Module.h" // For export macro
82
86
87class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
88{
89public:
92 void PrintSelf(ostream& os, vtkIndent indent) override;
93
97 void Render(const vtkRenderState* s) override;
98
103
105
111
115 enum
116 {
117 Clamp = 0,
118 Reinhard = 1,
119 Exponential = 2,
120 GenericFilmic = 3
121 };
122
124
128 vtkSetClampMacro(ToneMappingType, int, 0, 3);
129 vtkGetMacro(ToneMappingType, int);
131
133
137 vtkGetMacro(Exposure, float);
138 vtkSetMacro(Exposure, float);
140
142
146 vtkSetClampMacro(Contrast, float, 0.0001f, VTK_FLOAT_MAX);
147 vtkGetMacro(Contrast, float);
149
151
156 vtkSetClampMacro(Shoulder, float, 0.0001, 1.f);
157 vtkGetMacro(Shoulder, float);
159
161
165 vtkSetClampMacro(MidIn, float, 0.0001, 1.f);
166 vtkGetMacro(MidIn, float);
168
170
174 vtkSetClampMacro(MidOut, float, 0.0001, 1.f);
175 vtkGetMacro(MidOut, float);
177
179
183 vtkSetClampMacro(HdrMax, float, 1.f, VTK_FLOAT_MAX);
184 vtkGetMacro(HdrMax, float);
186
188
192 vtkSetMacro(UseACES, bool);
193 vtkGetMacro(UseACES, bool);
195
196protected:
199
203 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
204 vtkTextureObject* ColorTexture = nullptr;
205 vtkOpenGLQuadHelper* QuadHelper = nullptr;
206
207 vtkMTimeType PreComputeMTime = 0;
208
209 int ToneMappingType = GenericFilmic;
210 float Exposure = 1.0;
211
215 float Contrast = 1.6773;
216 float Shoulder = 0.9714;
217 float MidIn = 0.18;
218 float MidOut = 0.18;
219 float HdrMax = 11.0785;
220 bool UseACES = true;
221
225 bool UseACESChangeValue = true;
226
232 float ClippingPoint = 1.117427;
233 float ToeSpeed = 0.244676;
234
239
240private:
241 vtkToneMappingPass(const vtkToneMappingPass&) = delete;
242 void operator=(const vtkToneMappingPass&) = delete;
243};
244
245#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:113
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:39
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_FLOAT_MAX
Definition: vtkType.h:163