vtkDepthPeelingPass Class Reference

#include <vtkDepthPeelingPass.h>

Inheritance diagram for vtkDepthPeelingPass:

Inheritance graph
[legend]
Collaboration diagram for vtkDepthPeelingPass:

Collaboration graph
[legend]

List of all members.


Detailed Description

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 peformed by its delegate TranslucentPass. This delegate is therefore used multiple times.

Its delegate is usually set to a vtkTranslucentPass.

See also:
vtkRenderPass, vtkTranslucentPass
Tests:
vtkDepthPeelingPass (Tests)

Definition at line 51 of file vtkDepthPeelingPass.h.


Public Types

typedef vtkRenderPass Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void ReleaseGraphicsResources (vtkWindow *w)
virtual void Render (const vtkRenderState *s)
virtual vtkRenderPassGetTranslucentPass ()
virtual void SetTranslucentPass (vtkRenderPass *translucentPass)
virtual void SetOcclusionRatio (double)
virtual double GetOcclusionRatio ()
virtual void SetMaximumNumberOfPeels (int)
virtual int GetMaximumNumberOfPeels ()
virtual bool GetLastRenderingUsedDepthPeeling ()

Static Public Member Functions

static vtkDepthPeelingPassNew ()
static int IsTypeOf (const char *type)
static vtkDepthPeelingPassSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkDepthPeelingPass ()
virtual ~vtkDepthPeelingPass ()
void CheckSupport (vtkOpenGLRenderWindow *w)
void CheckCompilation (unsigned int fragmentShader)
int RenderPeel (const vtkRenderState *s, int layer)

Protected Attributes

vtkRenderPassTranslucentPass
vtkTimeStamp CheckTime
bool IsChecked
bool IsSupported
unsigned int DepthFormat
double OcclusionRatio
int MaximumNumberOfPeels
bool LastRenderingUsedDepthPeeling
vtkDepthPeelingPassLayerList * LayerList
unsigned int OpaqueLayerZ
unsigned int TransparentLayerZ
int DepthPeelingHigherLayer
vtkShaderProgram2Prog
vtkShader2Shader
int ShadowTexUnit
int OpaqueShadowTexUnit
int ViewportX
int ViewportY
int ViewportWidth
int ViewportHeight

Member Typedef Documentation

Reimplemented from vtkRenderPass.

Definition at line 55 of file vtkDepthPeelingPass.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

static vtkDepthPeelingPass* vtkDepthPeelingPass::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkDepthPeelingPass::GetClassName (  )  [virtual]

Reimplemented from vtkRenderPass.

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 ( vtkObject o  )  [static]

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.

Precondition:
s_exists: s!=0

Implements vtkRenderPass.

void vtkDepthPeelingPass::ReleaseGraphicsResources ( vtkWindow w  )  [virtual]

Release graphics resources and ask components to release their own resources.

Precondition:
w_exists: w!=0

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.

Precondition:
w_exists: w!=0

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.

Precondition:
s_exists: s!=0

positive_layer: layer>=0


Member Data Documentation

Definition at line 133 of file vtkDepthPeelingPass.h.

Definition at line 134 of file vtkDepthPeelingPass.h.

Definition at line 135 of file vtkDepthPeelingPass.h.

Definition at line 136 of file vtkDepthPeelingPass.h.

Cache viewport values for depth peeling.

Definition at line 140 of file vtkDepthPeelingPass.h.

Cache viewport values for depth peeling.

Definition at line 141 of file vtkDepthPeelingPass.h.

Cache viewport values for depth peeling.

Definition at line 142 of file vtkDepthPeelingPass.h.

Cache viewport values for depth peeling.

Definition at line 143 of file vtkDepthPeelingPass.h.

unsigned int vtkDepthPeelingPass::DepthFormat [protected]

Actual depth format: vtkgl::DEPTH_COMPONENT16_ARB or vtkgl::DEPTH_COMPONENT24_ARB

Definition at line 148 of file vtkDepthPeelingPass.h.

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 157 of file vtkDepthPeelingPass.h.

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 162 of file vtkDepthPeelingPass.h.

Definition at line 164 of file vtkDepthPeelingPass.h.

vtkDepthPeelingPassLayerList* vtkDepthPeelingPass::LayerList [protected]

Used by the depth peeling technique to store the transparency layers.

Definition at line 167 of file vtkDepthPeelingPass.h.

unsigned int vtkDepthPeelingPass::OpaqueLayerZ [protected]

Definition at line 169 of file vtkDepthPeelingPass.h.

unsigned int vtkDepthPeelingPass::TransparentLayerZ [protected]

Definition at line 170 of file vtkDepthPeelingPass.h.

Definition at line 177 of file vtkDepthPeelingPass.h.

Definition at line 179 of file vtkDepthPeelingPass.h.

Definition at line 180 of file vtkDepthPeelingPass.h.

Definition at line 182 of file vtkDepthPeelingPass.h.

Definition at line 183 of file vtkDepthPeelingPass.h.


The documentation for this class was generated from the following file:

Generated on Wed Aug 24 11:33:48 2011 for VTK by  doxygen 1.5.6