VTK
9.5.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
Examples
File List
File Members
Rendering
OpenGL2
vtkToneMappingPass.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
28
29
#ifndef vtkToneMappingPass_h
30
#define vtkToneMappingPass_h
31
32
#include "
vtkImageProcessingPass.h
"
33
#include "vtkRenderingOpenGL2Module.h"
// For export macro
34
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
35
36
VTK_ABI_NAMESPACE_BEGIN
37
class
vtkOpenGLFramebufferObject
;
38
class
vtkOpenGLQuadHelper
;
39
class
vtkTextureObject
;
40
41
class
VTKRENDERINGOPENGL2_EXPORT
VTK_MARSHALAUTO
vtkToneMappingPass
:
public
vtkImageProcessingPass
42
{
43
public
:
44
static
vtkToneMappingPass
*
New
();
45
vtkTypeMacro(
vtkToneMappingPass
,
vtkImageProcessingPass
);
46
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
47
51
void
Render
(
const
vtkRenderState
* s)
override
;
52
56
void
ReleaseGraphicsResources
(
vtkWindow
* w)
override
;
57
59
62
void
SetGenericFilmicDefaultPresets
();
63
void
SetGenericFilmicUncharted2Presets
();
65
69
enum
70
{
71
Clamp
= 0,
72
Reinhard
= 1,
73
Exponential
= 2,
74
GenericFilmic
= 3,
75
NeutralPBR
= 4
76
};
77
79
83
vtkSetClampMacro(
ToneMappingType
,
int
, 0, 4);
84
vtkGetMacro(
ToneMappingType
,
int
);
86
88
92
vtkGetMacro(
Exposure
,
float
);
93
vtkSetMacro(
Exposure
,
float
);
95
97
101
vtkSetClampMacro(
Contrast
,
float
, 0.0001f,
VTK_FLOAT_MAX
);
102
vtkGetMacro(
Contrast
,
float
);
104
106
111
vtkSetClampMacro(
Shoulder
,
float
, 0.0001, 1.f);
112
vtkGetMacro(
Shoulder
,
float
);
114
116
120
vtkSetClampMacro(
MidIn
,
float
, 0.0001, 1.f);
121
vtkGetMacro(
MidIn
,
float
);
123
125
129
vtkSetClampMacro(
MidOut
,
float
, 0.0001, 1.f);
130
vtkGetMacro(
MidOut
,
float
);
132
134
138
vtkSetClampMacro(
HdrMax
,
float
, 1.f,
VTK_FLOAT_MAX
);
139
vtkGetMacro(
HdrMax
,
float
);
141
143
147
vtkSetMacro(
UseACES
,
bool
);
148
vtkGetMacro(
UseACES
,
bool
);
150
151
protected
:
152
vtkToneMappingPass
() =
default
;
153
~vtkToneMappingPass
()
override
;
154
158
vtkOpenGLFramebufferObject
*
FrameBufferObject
=
nullptr
;
159
vtkTextureObject
*
ColorTexture
=
nullptr
;
160
vtkOpenGLQuadHelper
*
QuadHelper
=
nullptr
;
161
162
vtkMTimeType
PreComputeMTime
= 0;
163
164
int
ToneMappingType
=
GenericFilmic
;
165
float
Exposure
= 1.0;
166
170
float
Contrast
= 1.6773;
171
float
Shoulder
= 0.9714;
172
float
MidIn
= 0.18;
173
float
MidOut
= 0.18;
174
float
HdrMax
= 11.0785;
175
bool
UseACES
=
true
;
176
180
bool
UseACESChangeValue
=
true
;
181
187
float
ClippingPoint
= 1.117427;
188
float
ToeSpeed
= 0.244676;
189
193
void
PreComputeAnchorCurveGenericFilmic
();
194
195
private
:
196
vtkToneMappingPass
(
const
vtkToneMappingPass
&) =
delete
;
197
void
operator=(
const
vtkToneMappingPass
&) =
delete
;
198
};
199
200
VTK_ABI_NAMESPACE_END
201
#endif
vtkImageProcessingPass::vtkImageProcessingPass
vtkImageProcessingPass()
Default constructor.
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition
vtkOpenGLFramebufferObject.h:175
vtkOpenGLQuadHelper
Class to make rendering a full screen quad easier.
Definition
vtkOpenGLQuadHelper.h:53
vtkRenderState
Context in which a vtkRenderPass will render.
Definition
vtkRenderState.h:30
vtkTextureObject
In case DepthTextureCompare is true, specify the comparison function in use.
Definition
vtkTextureObject.h:34
vtkToneMappingPass::~vtkToneMappingPass
~vtkToneMappingPass() override
vtkToneMappingPass::Render
void Render(const vtkRenderState *s) override
Perform rendering according to a render state.
vtkToneMappingPass::PreComputeAnchorCurveGenericFilmic
void PreComputeAnchorCurveGenericFilmic()
Pre compute ClippingPoint and ToeSpeed.
vtkToneMappingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkToneMappingPass::ClippingPoint
float ClippingPoint
Computed from previous parameters.
Definition
vtkToneMappingPass.h:187
vtkToneMappingPass::vtkToneMappingPass
vtkToneMappingPass()=default
vtkToneMappingPass::New
static vtkToneMappingPass * New()
vtkToneMappingPass::SetGenericFilmicDefaultPresets
void SetGenericFilmicDefaultPresets()
Set function to set uncharted 2 presets, and default presets.
vtkToneMappingPass::UseACES
bool UseACES
Definition
vtkToneMappingPass.h:175
vtkToneMappingPass::HdrMax
float HdrMax
Definition
vtkToneMappingPass.h:174
vtkToneMappingPass::MidIn
float MidIn
Definition
vtkToneMappingPass.h:172
vtkToneMappingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkToneMappingPass::FrameBufferObject
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
Definition
vtkToneMappingPass.h:158
vtkToneMappingPass::QuadHelper
vtkOpenGLQuadHelper * QuadHelper
Definition
vtkToneMappingPass.h:160
vtkToneMappingPass::ToeSpeed
float ToeSpeed
Definition
vtkToneMappingPass.h:188
vtkToneMappingPass::Contrast
float Contrast
Parameters for Generic Filmic Tonemapping.
Definition
vtkToneMappingPass.h:170
vtkToneMappingPass::MidOut
float MidOut
Definition
vtkToneMappingPass.h:173
vtkToneMappingPass::ColorTexture
vtkTextureObject * ColorTexture
Definition
vtkToneMappingPass.h:159
vtkToneMappingPass::PreComputeMTime
vtkMTimeType PreComputeMTime
Definition
vtkToneMappingPass.h:162
vtkToneMappingPass::Exposure
float Exposure
Definition
vtkToneMappingPass.h:165
vtkToneMappingPass::Exponential
@ Exponential
Definition
vtkToneMappingPass.h:73
vtkToneMappingPass::GenericFilmic
@ GenericFilmic
Definition
vtkToneMappingPass.h:74
vtkToneMappingPass::NeutralPBR
@ NeutralPBR
Definition
vtkToneMappingPass.h:75
vtkToneMappingPass::Reinhard
@ Reinhard
Definition
vtkToneMappingPass.h:72
vtkToneMappingPass::Clamp
@ Clamp
Definition
vtkToneMappingPass.h:71
vtkToneMappingPass::Shoulder
float Shoulder
Definition
vtkToneMappingPass.h:171
vtkToneMappingPass::ToneMappingType
int ToneMappingType
Definition
vtkToneMappingPass.h:164
vtkToneMappingPass::SetGenericFilmicUncharted2Presets
void SetGenericFilmicUncharted2Presets()
Set function to set uncharted 2 presets, and default presets.
vtkToneMappingPass::UseACESChangeValue
bool UseACESChangeValue
Used to recompile the shader if UseACES is modified.
Definition
vtkToneMappingPass.h:180
vtkWindow
window superclass for vtkRenderWindow
Definition
vtkWindow.h:26
vtkImageProcessingPass.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition
vtkType.h:287
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition
vtkType.h:169
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:53
Generated on
for VTK by
1.15.0