VTK  9.3.0
vtkPBRIrradianceTexture.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
15#ifndef vtkPBRIrradianceTexture_h
16#define vtkPBRIrradianceTexture_h
17
18#include "vtkOpenGLTexture.h"
19#include "vtkRenderingOpenGL2Module.h" // For export macro
20
21VTK_ABI_NAMESPACE_BEGIN
25class vtkRenderWindow;
26
27class VTKRENDERINGOPENGL2_EXPORT vtkPBRIrradianceTexture : public vtkOpenGLTexture
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
35
39 vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
41
45 void Load(vtkRenderer*) override;
46
50 void Render(vtkRenderer* ren) override { this->Load(ren); }
51
53
57 vtkGetMacro(IrradianceSize, unsigned int);
58 vtkSetMacro(IrradianceSize, unsigned int);
60
62
68 vtkGetMacro(IrradianceStep, float);
69 vtkSetMacro(IrradianceStep, float);
71
73
78 vtkGetMacro(ConvertToLinear, bool);
79 vtkSetMacro(ConvertToLinear, bool);
80 vtkBooleanMacro(ConvertToLinear, bool);
82
90
91protected:
94
95 float IrradianceStep = 0.04908738521; // pi / 64
96 unsigned int IrradianceSize = 256;
97 vtkOpenGLTexture* InputTexture = nullptr;
98 bool ConvertToLinear = false;
99
100private:
102 void operator=(const vtkPBRIrradianceTexture&) = delete;
103};
104
105VTK_ABI_NAMESPACE_END
106#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
OpenGL texture map.
void Load(vtkRenderer *) override
Implement base class method.
precompute irradiance texture used in physically based rendering
void Render(vtkRenderer *ren) override
Implement base class method.
vtkPBRIrradianceTexture()=default
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
void Load(vtkRenderer *) override
Implement base class method.
static vtkPBRIrradianceTexture * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPBRIrradianceTexture() override
void SetInputTexture(vtkOpenGLTexture *texture)
Get/Set the input texture.
create a window for renderers to draw into
abstract specification for renderers
Definition vtkRenderer.h:59
window superclass for vtkRenderWindow
Definition vtkWindow.h:25