VTK
|
Implement an Order Independent Transparency render pass. More...
#include <vtkDepthPeelingPass.h>
Implement an Order Independent Transparency render pass.
Render the translucent polygonal geometry of a scene without sorting polygons in the view direction.
This pass expects an initialized depth buffer and color buffer. Initialized buffers means they have been cleared with farest z-value and background color/gradient/transparent color. An opaque pass may have been performed right after the initialization.
The depth peeling algorithm works by rendering the translucent polygonal geometry multiple times (once for each peel). The actually rendering of the translucent polygonal geometry is performed by its delegate TranslucentPass. This delegate is therefore used multiple times.
Its delegate is usually set to a vtkTranslucentPass.
Definition at line 52 of file vtkDepthPeelingPass.h.
Reimplemented from vtkRenderPass.
Definition at line 56 of file vtkDepthPeelingPass.h.
vtkDepthPeelingPass::vtkDepthPeelingPass | ( | ) | [protected] |
Is rendering at translucent geometry stage using depth peeling and rendering a layer other than the first one? (Boolean value) If so, the uniform variables UseTexture and Texture can be set. (Used by vtkOpenGLProperty or vtkOpenGLTexture) int GetDepthPeelingHigherLayer();
Default constructor. TranslucentPass is set to NULL.
virtual vtkDepthPeelingPass::~vtkDepthPeelingPass | ( | ) | [protected, virtual] |
Destructor.
static vtkDepthPeelingPass* vtkDepthPeelingPass::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
static int vtkDepthPeelingPass::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkRenderPass.
virtual int vtkDepthPeelingPass::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkRenderPass.
static vtkDepthPeelingPass* vtkDepthPeelingPass::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkRenderPass.
virtual vtkObjectBase* vtkDepthPeelingPass::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkRenderPass.
Reimplemented from vtkRenderPass.
void vtkDepthPeelingPass::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkRenderPass.
virtual void vtkDepthPeelingPass::Render | ( | const vtkRenderState * | s | ) | [virtual] |
Perform rendering according to a render state s
.
Implements vtkRenderPass.
void vtkDepthPeelingPass::ReleaseGraphicsResources | ( | vtkWindow * | w | ) | [virtual] |
Release graphics resources and ask components to release their own resources.
Reimplemented from vtkRenderPass.
virtual vtkRenderPass* vtkDepthPeelingPass::GetTranslucentPass | ( | ) | [virtual] |
Delegate for rendering the translucent polygonal geometry. If it is NULL, nothing will be rendered and a warning will be emitted. It is usually set to a vtkTranslucentPass. Initial value is a NULL pointer.
virtual void vtkDepthPeelingPass::SetTranslucentPass | ( | vtkRenderPass * | translucentPass | ) | [virtual] |
Delegate for rendering the translucent polygonal geometry. If it is NULL, nothing will be rendered and a warning will be emitted. It is usually set to a vtkTranslucentPass. Initial value is a NULL pointer.
virtual void vtkDepthPeelingPass::SetOcclusionRatio | ( | double | ) | [virtual] |
In case of use of depth peeling technique for rendering translucent material, define the threshold under which the algorithm stops to iterate over peel layers. This is the ratio of the number of pixels that have been touched by the last layer over the total number of pixels of the viewport area. Initial value is 0.0, meaning rendering have to be exact. Greater values may speed-up the rendering with small impact on the quality.
virtual double vtkDepthPeelingPass::GetOcclusionRatio | ( | ) | [virtual] |
In case of use of depth peeling technique for rendering translucent material, define the threshold under which the algorithm stops to iterate over peel layers. This is the ratio of the number of pixels that have been touched by the last layer over the total number of pixels of the viewport area. Initial value is 0.0, meaning rendering have to be exact. Greater values may speed-up the rendering with small impact on the quality.
virtual void vtkDepthPeelingPass::SetMaximumNumberOfPeels | ( | int | ) | [virtual] |
In case of depth peeling, define the maximum number of peeling layers. Initial value is 4. A special value of 0 means no maximum limit. It has to be a positive value.
virtual int vtkDepthPeelingPass::GetMaximumNumberOfPeels | ( | ) | [virtual] |
In case of depth peeling, define the maximum number of peeling layers. Initial value is 4. A special value of 0 means no maximum limit. It has to be a positive value.
virtual bool vtkDepthPeelingPass::GetLastRenderingUsedDepthPeeling | ( | ) | [virtual] |
Tells if the last time this pass was executed, the depth peeling algorithm was actually used. Initial value is false.
void vtkDepthPeelingPass::CheckSupport | ( | vtkOpenGLRenderWindow * | w | ) | [protected] |
Check if depth peeling is supported by the current OpenGL context.
void vtkDepthPeelingPass::CheckCompilation | ( | unsigned int | fragmentShader | ) | [protected] |
Check the compilation status of some fragment shader source.
int vtkDepthPeelingPass::RenderPeel | ( | const vtkRenderState * | s, |
int | layer | ||
) | [protected] |
Render a peel layer. If there is no more GPU RAM to save the texture, return false otherwise returns true. Also if layer==0 and no prop have been rendered (there is no translucent geometry), it returns false.
vtkRenderPass* vtkDepthPeelingPass::TranslucentPass [protected] |
Definition at line 134 of file vtkDepthPeelingPass.h.
vtkTimeStamp vtkDepthPeelingPass::CheckTime [protected] |
Definition at line 135 of file vtkDepthPeelingPass.h.
bool vtkDepthPeelingPass::IsChecked [protected] |
Definition at line 136 of file vtkDepthPeelingPass.h.
bool vtkDepthPeelingPass::IsSupported [protected] |
Definition at line 137 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::ViewportX [protected] |
Cache viewport values for depth peeling.
Definition at line 141 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::ViewportY [protected] |
Cache viewport values for depth peeling.
Definition at line 142 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::ViewportWidth [protected] |
Cache viewport values for depth peeling.
Definition at line 143 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::ViewportHeight [protected] |
Cache viewport values for depth peeling.
Definition at line 144 of file vtkDepthPeelingPass.h.
unsigned int vtkDepthPeelingPass::DepthFormat [protected] |
Actual depth format: vtkgl::DEPTH_COMPONENT16_ARB or vtkgl::DEPTH_COMPONENT24_ARB
Definition at line 149 of file vtkDepthPeelingPass.h.
double vtkDepthPeelingPass::OcclusionRatio [protected] |
In case of use of depth peeling technique for rendering translucent material, define the threshold under which the algorithm stops to iterate over peel layers. This is the ratio of the number of pixels that have been touched by the last layer over the total number of pixels of the viewport area. Initial value is 0.0, meaning rendering have to be exact. Greater values may speed-up the rendering with small impact on the quality.
Definition at line 158 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::MaximumNumberOfPeels [protected] |
In case of depth peeling, define the maximum number of peeling layers. Initial value is 4. A special value of 0 means no maximum limit. It has to be a positive value.
Definition at line 163 of file vtkDepthPeelingPass.h.
bool vtkDepthPeelingPass::LastRenderingUsedDepthPeeling [protected] |
Definition at line 165 of file vtkDepthPeelingPass.h.
vtkDepthPeelingPassLayerList* vtkDepthPeelingPass::LayerList [protected] |
Used by the depth peeling technique to store the transparency layers.
Definition at line 168 of file vtkDepthPeelingPass.h.
unsigned int vtkDepthPeelingPass::OpaqueLayerZ [protected] |
Definition at line 170 of file vtkDepthPeelingPass.h.
unsigned int vtkDepthPeelingPass::TransparentLayerZ [protected] |
Definition at line 171 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::DepthPeelingHigherLayer [protected] |
Definition at line 178 of file vtkDepthPeelingPass.h.
vtkShaderProgram2* vtkDepthPeelingPass::Prog [protected] |
Definition at line 180 of file vtkDepthPeelingPass.h.
vtkShader2* vtkDepthPeelingPass::Shader [protected] |
Definition at line 181 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::ShadowTexUnit [protected] |
Definition at line 183 of file vtkDepthPeelingPass.h.
int vtkDepthPeelingPass::OpaqueShadowTexUnit [protected] |
Definition at line 184 of file vtkDepthPeelingPass.h.