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=========================================================================*/
47#ifndef vtkToneMappingPass_h
48#define vtkToneMappingPass_h
49
51#include "vtkRenderingOpenGL2Module.h" // For export macro
52
56
57class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
58{
59public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
67 void Render(const vtkRenderState* s) override;
68
73
75
81
85 enum
86 {
87 Clamp = 0,
88 Reinhard = 1,
89 Exponential = 2,
90 GenericFilmic = 3
91 };
92
94
98 vtkSetClampMacro(ToneMappingType, int, 0, 3);
99 vtkGetMacro(ToneMappingType, int);
101
103
107 vtkGetMacro(Exposure, float);
108 vtkSetMacro(Exposure, float);
110
112
116 vtkSetClampMacro(Contrast, float, 0.0001f, VTK_FLOAT_MAX);
117 vtkGetMacro(Contrast, float);
119
121
126 vtkSetClampMacro(Shoulder, float, 0.0001, 1.f);
127 vtkGetMacro(Shoulder, float);
129
131
135 vtkSetClampMacro(MidIn, float, 0.0001, 1.f);
136 vtkGetMacro(MidIn, float);
138
140
144 vtkSetClampMacro(MidOut, float, 0.0001, 1.f);
145 vtkGetMacro(MidOut, float);
147
149
153 vtkSetClampMacro(HdrMax, float, 1.f, VTK_FLOAT_MAX);
154 vtkGetMacro(HdrMax, float);
156
158
162 vtkSetMacro(UseACES, bool);
163 vtkGetMacro(UseACES, bool);
165
166protected:
169
173 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
174 vtkTextureObject* ColorTexture = nullptr;
175 vtkOpenGLQuadHelper* QuadHelper = nullptr;
176
177 vtkMTimeType PreComputeMTime = 0;
178
179 int ToneMappingType = GenericFilmic;
180 float Exposure = 1.0;
181
185 float Contrast = 1.6773;
186 float Shoulder = 0.9714;
187 float MidIn = 0.18;
188 float MidOut = 0.18;
189 float HdrMax = 11.0785;
190 bool UseACES = true;
191
195 bool UseACESChangeValue = true;
196
202 float ClippingPoint = 1.117427;
203 float ToeSpeed = 0.244676;
204
209
210private:
211 vtkToneMappingPass(const vtkToneMappingPass&) = delete;
212 void operator=(const vtkToneMappingPass&) = delete;
213};
214
215#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:43
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:45
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_FLOAT_MAX
Definition: vtkType.h:163