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=========================================================================*/
38#ifndef vtkToneMappingPass_h
39#define vtkToneMappingPass_h
40
42#include "vtkRenderingOpenGL2Module.h" // For export macro
43
47
48class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 void Render(const vtkRenderState* s) override;
59
64
66
72
76 enum
77 {
78 Clamp = 0,
79 Reinhard = 1,
80 Exponential = 2,
81 GenericFilmic = 3
82 };
83
85
89 vtkSetClampMacro(ToneMappingType, int, 0, 3);
90 vtkGetMacro(ToneMappingType, int);
92
94
98 vtkGetMacro(Exposure, float);
99 vtkSetMacro(Exposure, float);
101
103
107 vtkSetClampMacro(Contrast, float, 0.0001f, VTK_FLOAT_MAX);
108 vtkGetMacro(Contrast, float);
110
112
117 vtkSetClampMacro(Shoulder, float, 0.0001, 1.f);
118 vtkGetMacro(Shoulder, float);
120
122
126 vtkSetClampMacro(MidIn, float, 0.0001, 1.f);
127 vtkGetMacro(MidIn, float);
129
131
135 vtkSetClampMacro(MidOut, float, 0.0001, 1.f);
136 vtkGetMacro(MidOut, float);
138
140
144 vtkSetClampMacro(HdrMax, float, 1.f, VTK_FLOAT_MAX);
145 vtkGetMacro(HdrMax, float);
147
149
153 vtkSetMacro(UseACES, bool);
154 vtkGetMacro(UseACES, bool);
156
157protected:
160
164 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
165 vtkTextureObject* ColorTexture = nullptr;
166 vtkOpenGLQuadHelper* QuadHelper = nullptr;
167
168 vtkMTimeType PreComputeMTime = 0;
169
170 int ToneMappingType = GenericFilmic;
171 float Exposure = 1.0;
172
176 float Contrast = 1.6773;
177 float Shoulder = 0.9714;
178 float MidIn = 0.18;
179 float MidOut = 0.18;
180 float HdrMax = 11.0785;
181 bool UseACES = true;
182
186 bool UseACESChangeValue = true;
187
193 float ClippingPoint = 1.117427;
194 float ToeSpeed = 0.244676;
195
200
201private:
202 vtkToneMappingPass(const vtkToneMappingPass&) = delete;
203 void operator=(const vtkToneMappingPass&) = delete;
204};
205
206#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition vtkIndent.h:34
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