VTK  9.2.6
vtkPBRPrefilterTexture.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPBRPrefilterTexture.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=========================================================================*/
28#ifndef vtkPBRPrefilterTexture_h
29#define vtkPBRPrefilterTexture_h
30
31#include "vtkOpenGLTexture.h"
32#include "vtkRenderingOpenGL2Module.h" // For export macro
33
37class vtkRenderWindow;
38
39class VTKRENDERINGOPENGL2_EXPORT vtkPBRPrefilterTexture : public vtkOpenGLTexture
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
51 vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
53
57 void Load(vtkRenderer*) override;
58
62 void Render(vtkRenderer* ren) override { this->Load(ren); }
63
65
68 vtkGetMacro(PrefilterSize, unsigned int);
70
72
76 vtkGetMacro(PrefilterLevels, unsigned int);
77 vtkSetMacro(PrefilterLevels, unsigned int);
79
81
87 vtkGetMacro(PrefilterMaxSamples, unsigned int);
88 vtkSetMacro(PrefilterMaxSamples, unsigned int);
90
92
97 vtkGetMacro(ConvertToLinear, bool);
98 vtkSetMacro(ConvertToLinear, bool);
99 vtkBooleanMacro(ConvertToLinear, bool);
101
103
109 vtkGetMacro(HalfPrecision, bool);
110 vtkSetMacro(HalfPrecision, bool);
111 vtkBooleanMacro(HalfPrecision, bool);
113
121
122protected:
125
126 unsigned int PrefilterSize;
127 unsigned int PrefilterLevels = 5;
128 unsigned int PrefilterMaxSamples = 512;
129 vtkOpenGLTexture* InputTexture = nullptr;
130 bool ConvertToLinear = false;
131 bool HalfPrecision = true;
132
133private:
135 void operator=(const vtkPBRPrefilterTexture&) = delete;
136};
137
138#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
OpenGL texture map.
void Load(vtkRenderer *) override
Implement base class method.
precompute prefilter texture used in physically based rendering
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPBRPrefilterTexture() override
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
void Load(vtkRenderer *) override
Implement base class method.
void Render(vtkRenderer *ren) override
Implement base class method.
static vtkPBRPrefilterTexture * New()
void SetInputTexture(vtkOpenGLTexture *)
Get/Set the input texture.
vtkPBRPrefilterTexture()=default
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:73
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39