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
67
68
#ifndef vtkToneMappingPass_h
69
#define vtkToneMappingPass_h
70
71
#include "
vtkImageProcessingPass.h
"
72
#include "vtkRenderingOpenGL2Module.h"
// For export macro
73
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
74
75
VTK_ABI_NAMESPACE_BEGIN
76
class
vtkOpenGLFramebufferObject
;
77
class
vtkOpenGLQuadHelper
;
78
class
vtkTextureObject
;
79
80
class
VTKRENDERINGOPENGL2_EXPORT
VTK_MARSHALAUTO
vtkToneMappingPass
:
public
vtkImageProcessingPass
81
{
82
public
:
83
static
vtkToneMappingPass
*
New
();
84
vtkTypeMacro(
vtkToneMappingPass
,
vtkImageProcessingPass
);
85
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
86
90
void
Render
(
const
vtkRenderState
* s)
override
;
91
95
void
ReleaseGraphicsResources
(
vtkWindow
* w)
override
;
96
98
101
void
SetGenericFilmicDefaultPresets
();
102
void
SetGenericFilmicUncharted2Presets
();
104
108
enum
109
{
110
Clamp
= 0,
111
Reinhard
= 1,
112
Exponential
= 2,
113
GenericFilmic
= 3,
114
NeutralPBR
= 4
115
};
116
118
122
vtkSetClampMacro(
ToneMappingType
,
int
, 0, 4);
123
vtkGetMacro(
ToneMappingType
,
int
);
125
127
131
vtkGetMacro(
Exposure
,
float
);
132
vtkSetMacro(
Exposure
,
float
);
134
136
140
vtkSetClampMacro(
Contrast
,
float
, 0.0001f,
VTK_FLOAT_MAX
);
141
vtkGetMacro(
Contrast
,
float
);
143
145
150
vtkSetClampMacro(
Shoulder
,
float
, 0.0001, 1.f);
151
vtkGetMacro(
Shoulder
,
float
);
153
155
159
vtkSetClampMacro(
MidIn
,
float
, 0.0001, 1.f);
160
vtkGetMacro(
MidIn
,
float
);
162
164
168
vtkSetClampMacro(
MidOut
,
float
, 0.0001, 1.f);
169
vtkGetMacro(
MidOut
,
float
);
171
173
177
vtkSetClampMacro(
HdrMax
,
float
, 1.f,
VTK_FLOAT_MAX
);
178
vtkGetMacro(
HdrMax
,
float
);
180
182
186
vtkSetMacro(
UseACES
,
bool
);
187
vtkGetMacro(
UseACES
,
bool
);
189
190
protected
:
191
vtkToneMappingPass
() =
default
;
192
~vtkToneMappingPass
()
override
;
193
197
vtkOpenGLFramebufferObject
*
FrameBufferObject
=
nullptr
;
198
vtkTextureObject
*
ColorTexture
=
nullptr
;
199
vtkOpenGLQuadHelper
*
QuadHelper
=
nullptr
;
200
201
vtkMTimeType
PreComputeMTime
= 0;
202
203
int
ToneMappingType
=
GenericFilmic
;
204
float
Exposure
= 1.0;
205
209
float
Contrast
= 1.6773;
210
float
Shoulder
= 0.9714;
211
float
MidIn
= 0.18;
212
float
MidOut
= 0.18;
213
float
HdrMax
= 11.0785;
214
bool
UseACES
=
true
;
215
219
bool
UseACESChangeValue
=
true
;
220
226
float
ClippingPoint
= 1.117427;
227
float
ToeSpeed
= 0.244676;
228
232
void
PreComputeAnchorCurveGenericFilmic
();
233
234
private
:
235
vtkToneMappingPass
(
const
vtkToneMappingPass
&) =
delete
;
236
void
operator=(
const
vtkToneMappingPass
&) =
delete
;
237
};
238
239
VTK_ABI_NAMESPACE_END
240
#endif
vtkImageProcessingPass::vtkImageProcessingPass
vtkImageProcessingPass()
Default constructor.
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
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:226
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:214
vtkToneMappingPass::HdrMax
float HdrMax
Definition
vtkToneMappingPass.h:213
vtkToneMappingPass::MidIn
float MidIn
Definition
vtkToneMappingPass.h:211
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:197
vtkToneMappingPass::QuadHelper
vtkOpenGLQuadHelper * QuadHelper
Definition
vtkToneMappingPass.h:199
vtkToneMappingPass::ToeSpeed
float ToeSpeed
Definition
vtkToneMappingPass.h:227
vtkToneMappingPass::Contrast
float Contrast
Parameters for Generic Filmic Tonemapping.
Definition
vtkToneMappingPass.h:209
vtkToneMappingPass::MidOut
float MidOut
Definition
vtkToneMappingPass.h:212
vtkToneMappingPass::ColorTexture
vtkTextureObject * ColorTexture
Definition
vtkToneMappingPass.h:198
vtkToneMappingPass::PreComputeMTime
vtkMTimeType PreComputeMTime
Definition
vtkToneMappingPass.h:201
vtkToneMappingPass::Exposure
float Exposure
Definition
vtkToneMappingPass.h:204
vtkToneMappingPass::Exponential
@ Exponential
Definition
vtkToneMappingPass.h:112
vtkToneMappingPass::GenericFilmic
@ GenericFilmic
Definition
vtkToneMappingPass.h:113
vtkToneMappingPass::NeutralPBR
@ NeutralPBR
Definition
vtkToneMappingPass.h:114
vtkToneMappingPass::Reinhard
@ Reinhard
Definition
vtkToneMappingPass.h:111
vtkToneMappingPass::Clamp
@ Clamp
Definition
vtkToneMappingPass.h:110
vtkToneMappingPass::Shoulder
float Shoulder
Definition
vtkToneMappingPass.h:210
vtkToneMappingPass::ToneMappingType
int ToneMappingType
Definition
vtkToneMappingPass.h:203
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:219
vtkWindow
window superclass for vtkRenderWindow
Definition
vtkWindow.h:45
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