VTK
9.0.1
Rendering
OpenGL2
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
41
#include "
vtkImageProcessingPass.h
"
42
#include "vtkRenderingOpenGL2Module.h"
// For export macro
43
44
class
vtkOpenGLFramebufferObject
;
45
class
vtkOpenGLQuadHelper
;
46
class
vtkTextureObject
;
47
48
class
VTKRENDERINGOPENGL2_EXPORT
vtkToneMappingPass
:
public
vtkImageProcessingPass
49
{
50
public
:
51
static
vtkToneMappingPass
*
New
();
52
vtkTypeMacro(
vtkToneMappingPass
,
vtkImageProcessingPass
);
53
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
54
58
void
Render
(
const
vtkRenderState
* s)
override
;
59
63
void
ReleaseGraphicsResources
(
vtkWindow
* w)
override
;
64
66
69
void
SetGenericFilmicDefaultPresets();
70
void
SetGenericFilmicUncharted2Presets();
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
157
protected
:
158
vtkToneMappingPass
() =
default
;
159
~
vtkToneMappingPass
()
override
;
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
199
void
PreComputeAnchorCurveGenericFilmic();
200
201
private
:
202
vtkToneMappingPass
(
const
vtkToneMappingPass
&) =
delete
;
203
void
operator=(
const
vtkToneMappingPass
&) =
delete
;
204
};
205
206
#endif
vtkImageProcessingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageProcessingPass.h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkRenderPass::Render
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition:
vtkOpenGLFramebufferObject.h:181
vtkOpenGLQuadHelper
Class to make rendering a full screen quad easier.
Definition:
vtkOpenGLQuadHelper.h:57
vtkImageProcessingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:37
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:40
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition:
vtkType.h:163
vtkToneMappingPass
Implement a post-processing Tone Mapping.
Definition:
vtkToneMappingPass.h:48
vtkRenderState
Context in which a vtkRenderPass will render.
Definition:
vtkRenderState.h:40
vtkImageProcessingPass
Convenient class for post-processing passes. render pass.
Definition:
vtkImageProcessingPass.h:38
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition:
vtkType.h:293
Generated on Thu Jun 24 2021 15:17:26 for VTK by
1.8.17