VTK
vtkEDLShading.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: VTK
4  Module: vtkEDLShading.h
5 
6  Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 =========================================================================*/
32 /*----------------------------------------------------------------------
33 Acknowledgement:
34 This algorithm is the result of joint work by Electricité de France,
35 CNRS, Collège de France and Université J. Fourier as part of the
36 Ph.D. thesis of Christian BOUCHENY.
37 ------------------------------------------------------------------------*/
59 #ifndef vtkEDLShading_h
60 #define vtkEDLShading_h
61 
62 #define EDL_HIGH_RESOLUTION_ON 1
63 #define EDL_LOW_RESOLUTION_ON 1
64 
66 #include "vtkRenderingOpenGL2Module.h" // For export macro
67 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
68 #include "vtkOpenGLHelper.h" // used for ivars
69 
72 class vtkTextureObject;
73 
74 class VTKRENDERINGOPENGL2_EXPORT vtkEDLShading : public vtkDepthImageProcessingPass
75 {
76 public:
77  static vtkEDLShading *New();
79  void PrintSelf(ostream& os, vtkIndent indent);
80 
85  virtual void Render(const vtkRenderState *s);
86 
93 
94  protected:
99 
103  virtual ~vtkEDLShading();
104 
109 
114 
119 
124 
129 
134 
136 
140  // used to record scene data
142  // color render target for projection pass
144  // depth render target for projection pass
146 
147  // Framebuffer objects and textures for EDL
149  // for EDL full res shading
151  // color render target for EDL full res pass
153  // for EDL low res shading (image size/4)
155  // color render target for EDL low res pass
157  // color render target for EDL low res
158  // bilateral filter pass
159 
160  // Shader prohrams
164 
165  float EDLNeighbours[8][4];
167  int EDLLowResFactor; // basically 4
168 
169  float Zn; // near clipping plane
170  float Zf; // far clipping plane
171 
172  private:
173  vtkEDLShading(const vtkEDLShading&) VTK_DELETE_FUNCTION;
174  void operator=(const vtkEDLShading&) VTK_DELETE_FUNCTION;
175 };
176 
177 #endif
vtkEDLShading::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDepthImageProcessingPass
Convenient class for post-processing passes.
Definition: vtkDepthImageProcessingPass.h:63
vtkEDLShading::EDLBlurLow
bool EDLBlurLow(vtkRenderState &s, vtkOpenGLRenderWindow *)
Render EDL in middle resolution buffer.
vtkEDLShading::EDLComposeProgram
vtkOpenGLHelper EDLComposeProgram
Definition: vtkEDLShading.h:162
vtkFrameBufferObject
internal class which encapsulates OpenGL frame buffer object.
Definition: vtkFrameBufferObject.h:47
vtkEDLShading::ProjectionColorTexture
vtkTextureObject * ProjectionColorTexture
Definition: vtkEDLShading.h:141
vtkEDLShading::EDLHighFBO
vtkFrameBufferObject * EDLHighFBO
Definition: vtkEDLShading.h:148
vtkEDLShading::vtkEDLShading
vtkEDLShading()
Default constructor.
vtkOpenGLHelper.h
vtkEDLShading::ProjectionDepthTexture
vtkTextureObject * ProjectionDepthTexture
Definition: vtkEDLShading.h:143
vtkEDLShading::Zn
float Zn
Definition: vtkEDLShading.h:169
vtkEDLShading::EDLShadeProgram
vtkOpenGLHelper EDLShadeProgram
Definition: vtkEDLShading.h:161
vtkEDLShading::EDLCompose
bool EDLCompose(const vtkRenderState *s, vtkOpenGLRenderWindow *)
Compose color and shaded images.
vtkEDLShading::EDLShadeLow
bool EDLShadeLow(vtkRenderState &s, vtkOpenGLRenderWindow *)
Render EDL in middle resolution buffer.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkEDLShading::EDLLowFBO
vtkFrameBufferObject * EDLLowFBO
Definition: vtkEDLShading.h:152
vtkEDLShading::EDLHighShadeTexture
vtkTextureObject * EDLHighShadeTexture
Definition: vtkEDLShading.h:150
vtkEDLShading::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w)
Release graphics resources and ask components to release their own resources.
vtkEDLShading::EDLShadeHigh
bool EDLShadeHigh(vtkRenderState &s, vtkOpenGLRenderWindow *)
Render EDL in full resolution buffer.
vtkEDLShading::Zf
float Zf
Definition: vtkEDLShading.h:170
vtkOpenGLHelper
Definition: vtkOpenGLHelper.h:31
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:41
vtkEDLShading::EDLInitializeFramebuffers
void EDLInitializeFramebuffers(vtkRenderState &s)
Initialization of required framebuffer objects.
vtkEDLShading::Render
virtual void Render(const vtkRenderState *s)
Perform rendering according to a render state s.
vtkSmartPointer.h
vtkEDLShading::~vtkEDLShading
virtual ~vtkEDLShading()
Destructor.
vtkEDLShading::EDLLowResFactor
int EDLLowResFactor
Definition: vtkEDLShading.h:167
vtkEDLShading
Implement an EDL offscreen shading.
Definition: vtkEDLShading.h:75
vtkEDLShading::EDLInitializeShaders
void EDLInitializeShaders(vtkOpenGLRenderWindow *)
Initialization of required GLSL shaders.
vtkEDLShading::EDLIsFiltered
bool EDLIsFiltered
Definition: vtkEDLShading.h:166
vtkEDLShading::BilateralProgram
vtkOpenGLHelper BilateralProgram
Definition: vtkEDLShading.h:163
vtkEDLShading::ProjectionFBO
vtkFrameBufferObject * ProjectionFBO
Framebuffer object and textures for initial projection.
Definition: vtkEDLShading.h:139
vtkEDLShading::New
static vtkEDLShading * New()
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:39
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:41
vtkEDLShading::EDLLowBlurTexture
vtkTextureObject * EDLLowBlurTexture
Definition: vtkEDLShading.h:156
vtkEDLShading::EDLLowShadeTexture
vtkTextureObject * EDLLowShadeTexture
Definition: vtkEDLShading.h:154
vtkDepthImageProcessingPass.h