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=========================================================================*/
80#ifndef vtkToneMappingPass_h
81#define vtkToneMappingPass_h
82
84#include "vtkRenderingOpenGL2Module.h" // For export macro
85
89
90class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
91{
92public:
95 void PrintSelf(ostream& os, vtkIndent indent) override;
96
100 void Render(const vtkRenderState* s) override;
101
106
108
114
118 enum
119 {
120 Clamp = 0,
121 Reinhard = 1,
122 Exponential = 2,
123 GenericFilmic = 3
124 };
125
127
131 vtkSetClampMacro(ToneMappingType, int, 0, 3);
132 vtkGetMacro(ToneMappingType, int);
134
136
140 vtkGetMacro(Exposure, float);
141 vtkSetMacro(Exposure, float);
143
145
149 vtkSetClampMacro(Contrast, float, 0.0001f, VTK_FLOAT_MAX);
150 vtkGetMacro(Contrast, float);
152
154
159 vtkSetClampMacro(Shoulder, float, 0.0001, 1.f);
160 vtkGetMacro(Shoulder, float);
162
164
168 vtkSetClampMacro(MidIn, float, 0.0001, 1.f);
169 vtkGetMacro(MidIn, float);
171
173
177 vtkSetClampMacro(MidOut, float, 0.0001, 1.f);
178 vtkGetMacro(MidOut, float);
180
182
186 vtkSetClampMacro(HdrMax, float, 1.f, VTK_FLOAT_MAX);
187 vtkGetMacro(HdrMax, float);
189
191
195 vtkSetMacro(UseACES, bool);
196 vtkGetMacro(UseACES, bool);
198
199protected:
202
206 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
207 vtkTextureObject* ColorTexture = nullptr;
208 vtkOpenGLQuadHelper* QuadHelper = nullptr;
209
210 vtkMTimeType PreComputeMTime = 0;
211
212 int ToneMappingType = GenericFilmic;
213 float Exposure = 1.0;
214
218 float Contrast = 1.6773;
219 float Shoulder = 0.9714;
220 float MidIn = 0.18;
221 float MidOut = 0.18;
222 float HdrMax = 11.0785;
223 bool UseACES = true;
224
228 bool UseACESChangeValue = true;
229
235 float ClippingPoint = 1.117427;
236 float ToeSpeed = 0.244676;
237
242
243private:
244 vtkToneMappingPass(const vtkToneMappingPass&) = delete;
245 void operator=(const vtkToneMappingPass&) = delete;
246};
247
248#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:119
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:36
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_FLOAT_MAX
Definition: vtkType.h:163