VTK  9.0.2
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 ------------------------------------------------------------------------*/
39 #ifndef vtkEDLShading_h
40 #define vtkEDLShading_h
41 
42 #define EDL_HIGH_RESOLUTION_ON 1
43 #define EDL_LOW_RESOLUTION_ON 1
44 
46 #include "vtkOpenGLHelper.h" // used for ivars
47 #include "vtkRenderingOpenGL2Module.h" // For export macro
48 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
49 
52 class vtkTextureObject;
53 
54 class VTKRENDERINGOPENGL2_EXPORT vtkEDLShading : public vtkDepthImageProcessingPass
55 {
56 public:
57  static vtkEDLShading* New();
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
65  void Render(const vtkRenderState* s) override;
66 
73 
74 protected:
79 
83  ~vtkEDLShading() override;
84 
89 
94 
99 
104 
109 
114 
116 
120  // used to record scene data
122  // color render target for projection pass
124  // depth render target for projection pass
126 
127  // Framebuffer objects and textures for EDL
129  // for EDL full res shading
131  // color render target for EDL full res pass
133  // for EDL low res shading (image size/4)
135  // color render target for EDL low res pass
137  // color render target for EDL low res
138  // bilateral filter pass
139 
140  // Shader prohrams
144 
145  float EDLNeighbours[8][4];
147  int EDLLowResFactor; // basically 4
148 
149  float Zn; // near clipping plane
150  float Zf; // far clipping plane
151 
152 private:
153  vtkEDLShading(const vtkEDLShading&) = delete;
154  void operator=(const vtkEDLShading&) = delete;
155 };
156 
157 #endif
Convenient class for post-processing passes.
Implement an EDL offscreen shading.
Definition: vtkEDLShading.h:55
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
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
vtkOpenGLFramebufferObject * ProjectionFBO
Framebuffer object and textures for initial projection.
a simple class to control print indentation
Definition: vtkIndent.h:34
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:38