VTK  9.2.5
vtkEDLShading.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: VTK
4  Module: vtkEDLShading.h
5 
6  Copyright (c) Sandia Corporation, Kitware Inc.
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 =========================================================================*/
15 /*----------------------------------------------------------------------
16 Acknowledgement:
17 This algorithm is the result of joint work by Electricité de France,
18 CNRS, Collège de France and Université J. Fourier as part of the
19 Ph.D. thesis of Christian BOUCHENY.
20 ------------------------------------------------------------------------*/
42 #ifndef vtkEDLShading_h
43 #define vtkEDLShading_h
44 
45 #define EDL_HIGH_RESOLUTION_ON 1
46 #define EDL_LOW_RESOLUTION_ON 1
47 
49 #include "vtkOpenGLHelper.h" // used for ivars
50 #include "vtkRenderingOpenGL2Module.h" // For export macro
51 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
52 
55 class vtkTextureObject;
56 
57 class VTKRENDERINGOPENGL2_EXPORT vtkEDLShading : public vtkDepthImageProcessingPass
58 {
59 public:
60  static vtkEDLShading* New();
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
68  void Render(const vtkRenderState* s) override;
69 
76 
77 protected:
82 
86  ~vtkEDLShading() override;
87 
92 
97 
102 
107 
112 
117 
119 
123  // used to record scene data
125  // color render target for projection pass
127  // depth render target for projection pass
129 
130  // Framebuffer objects and textures for EDL
132  // for EDL full res shading
134  // color render target for EDL full res pass
136  // for EDL low res shading (image size/4)
138  // color render target for EDL low res pass
140  // color render target for EDL low res
141  // bilateral filter pass
142 
143  // Shader prohrams
147 
148  float EDLNeighbours[8][4];
150  int EDLLowResFactor; // basically 4
151 
152  float Zn; // near clipping plane
153  float Zf; // far clipping plane
154 
155 private:
156  vtkEDLShading(const vtkEDLShading&) = delete;
157  void operator=(const vtkEDLShading&) = delete;
158 };
159 
160 #endif
Convenient class for post-processing passes.
Implement an EDL offscreen shading.
Definition: vtkEDLShading.h:58
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool EDLCompose(const vtkRenderState *s, vtkOpenGLRenderWindow *)
Compose color and shaded images.
vtkOpenGLHelper EDLComposeProgram
vtkTextureObject * EDLLowBlurTexture
void EDLInitializeShaders(vtkOpenGLRenderWindow *)
Initialization of required GLSL shaders.
vtkEDLShading()
Default constructor.
~vtkEDLShading() override
Destructor.
void EDLInitializeFramebuffers(vtkRenderState &s)
Initialization of required framebuffer objects.
vtkOpenGLFramebufferObject * EDLHighFBO
bool EDLBlurLow(vtkRenderState &s, vtkOpenGLRenderWindow *)
Render EDL in middle resolution buffer.
vtkOpenGLHelper EDLShadeProgram
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkTextureObject * ProjectionDepthTexture
Framebuffer object and textures for initial projection.
bool EDLShadeLow(vtkRenderState &s, vtkOpenGLRenderWindow *)
Render EDL in middle resolution buffer.
vtkTextureObject * EDLLowShadeTexture
vtkTextureObject * EDLHighShadeTexture
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
bool EDLShadeHigh(vtkRenderState &s, vtkOpenGLRenderWindow *)
Render EDL in full resolution buffer.
static vtkEDLShading * New()
vtkOpenGLHelper BilateralProgram
vtkOpenGLFramebufferObject * EDLLowFBO
vtkTextureObject * ProjectionColorTexture
Framebuffer object and textures for initial projection.
vtkOpenGLFramebufferObject * ProjectionFBO
Framebuffer object and textures for initial projection.
a simple class to control print indentation
Definition: vtkIndent.h:119
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
Context in which a vtkRenderPass will render.
abstracts an OpenGL texture object.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39