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=========================================================================*/
40
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,
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
170
172
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
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
vtkImageProcessingPass()
Default constructor.
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.
~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.
float ClippingPoint
Computed from previous parameters.
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.
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
vtkOpenGLQuadHelper * QuadHelper
float Contrast
Parameters for Generic Filmic Tonemapping.
vtkTextureObject * ColorTexture
void SetGenericFilmicUncharted2Presets()
Set function to set uncharted 2 presets, and default presets.
bool UseACESChangeValue
Used to recompile the shader if UseACES is modified.
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_FLOAT_MAX
Definition vtkType.h:163