VTK  9.2.5
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=========================================================================*/
41#ifndef vtkToneMappingPass_h
42#define vtkToneMappingPass_h
43
45#include "vtkRenderingOpenGL2Module.h" // For export macro
46
50
51class VTKRENDERINGOPENGL2_EXPORT vtkToneMappingPass : public vtkImageProcessingPass
52{
53public:
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
61 void Render(const vtkRenderState* s) override;
62
67
69
75
79 enum
80 {
81 Clamp = 0,
82 Reinhard = 1,
83 Exponential = 2,
84 GenericFilmic = 3
85 };
86
88
92 vtkSetClampMacro(ToneMappingType, int, 0, 3);
93 vtkGetMacro(ToneMappingType, int);
95
97
101 vtkGetMacro(Exposure, float);
102 vtkSetMacro(Exposure, float);
104
106
110 vtkSetClampMacro(Contrast, float, 0.0001f, VTK_FLOAT_MAX);
111 vtkGetMacro(Contrast, float);
113
115
120 vtkSetClampMacro(Shoulder, float, 0.0001, 1.f);
121 vtkGetMacro(Shoulder, float);
123
125
129 vtkSetClampMacro(MidIn, float, 0.0001, 1.f);
130 vtkGetMacro(MidIn, float);
132
134
138 vtkSetClampMacro(MidOut, float, 0.0001, 1.f);
139 vtkGetMacro(MidOut, float);
141
143
147 vtkSetClampMacro(HdrMax, float, 1.f, VTK_FLOAT_MAX);
148 vtkGetMacro(HdrMax, float);
150
152
156 vtkSetMacro(UseACES, bool);
157 vtkGetMacro(UseACES, bool);
159
160protected:
163
167 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
168 vtkTextureObject* ColorTexture = nullptr;
169 vtkOpenGLQuadHelper* QuadHelper = nullptr;
170
171 vtkMTimeType PreComputeMTime = 0;
172
173 int ToneMappingType = GenericFilmic;
174 float Exposure = 1.0;
175
179 float Contrast = 1.6773;
180 float Shoulder = 0.9714;
181 float MidIn = 0.18;
182 float MidOut = 0.18;
183 float HdrMax = 11.0785;
184 bool UseACES = true;
185
189 bool UseACESChangeValue = true;
190
196 float ClippingPoint = 1.117427;
197 float ToeSpeed = 0.244676;
198
203
204private:
205 vtkToneMappingPass(const vtkToneMappingPass&) = delete;
206 void operator=(const vtkToneMappingPass&) = delete;
207};
208
209#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:40
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