Go to the documentation of this file.
51 #ifndef vtkDualDepthPeelingPass_h
52 #define vtkDualDepthPeelingPass_h
54 #include "vtkRenderingOpenGL2Module.h"
84 virtual void SetVolumetricPass(
vtkRenderPass *volumetricPass);
106 bool PostReplaceTranslucentShaderValues(
std::string &vertexShader,
111 bool PreReplaceVolumetricShaderValues(
std::string &vertexShader,
159 void SetCurrentStage(ShaderStage stage);
160 vtkSetMacro(CurrentPeelType, PeelType)
165 void FreeGLObjects();
170 void RenderTranslucentPass();
175 void RenderVolumetricPass();
177 bool IsRenderingVolumes();
199 { this->ActivateDrawBuffers(&
id, 1); }
200 template <
size_t NumTextures>
202 { this->ActivateDrawBuffers(a.data(), a.size()); }
203 void ActivateDrawBuffers(
const TextureName *ids,
size_t numTextures);
211 void InitializeOcclusionQuery();
212 void CopyOpaqueDepthBuffer();
213 void InitializeDepth();
215 void PeelVolumesOutsideTranslucentRange();
227 void PrepareFrontDestination();
228 void ClearFrontDestination();
229 void CopyFrontSourceToFrontDestination();
231 void InitializeTargetsForTranslucentPass();
232 void InitializeTargetsForVolumetricPass();
234 void PeelTranslucentGeometry();
235 void PeelVolumetricGeometry();
237 void BlendBackBuffer();
239 void StartTranslucentOcclusionQuery();
240 void EndTranslucentOcclusionQuery();
242 void StartVolumetricOcclusionQuery();
243 void EndVolumetricOcclusionQuery();
248 void SwapFrontBufferSourceDest();
249 void SwapDepthBufferSourceDest();
253 void AlphaBlendRender();
255 void BlendFinalImage();
256 void DeleteOcclusionQueryIds();
300 #endif // vtkDualDepthPeelingPass_h
TextureName FrontDestination
virtual vtkMTimeType GetShaderStageMTime()
For multi-stage render passes that need to change shader code during a single pass,...
bool SaveScissorTestState
unsigned int TranslucentOcclusionQueryId
Implements the dual depth peeling algorithm.
void ActivateDrawBuffers(const std::array< TextureName, NumTextures > &a)
Bind and activate draw buffers.
static vtkDepthPeelingPass * New()
Implement Depth Peeling for use within a framebuffer pass.
const vtkRenderState * RenderState
vtkOpenGLQuadHelper * BackBlendHelper
vtkOpenGLQuadHelper * CopyDepthHelper
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned int VolumetricWrittenPixels
record modification and/or execution time
vtkTimeStamp CurrentStageTimeStamp
virtual bool PreReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
Use vtkShaderProgram::Substitute to replace //VTK::XXX:YYY declarations in the shader sources.
Internal class which encapsulates OpenGL FramebufferObject.
Class to make rendering a full screen quad easier.
window superclass for vtkRenderWindow
TextureName DepthDestination
unsigned int OcclusionThreshold
The ShaderProgram uses one or more Shader objects.
a simple class to control print indentation
abstracts an OpenGL texture object.
bool PostReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop) override
Use vtkShaderProgram::Substitute to replace //VTK::XXX:YYY declarations in the shader sources.
int VolumetricRenderCount
Asynchronously measures GPU execution times for a series of events.
vtkOpenGLQuadHelper * CopyColorHelper
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
int TranslucentRenderCount
abstract superclass for all actors, volumes and annotations
vtkRenderTimerLog * Timer
vtkRenderPass * VolumetricPass
vtkOpenGLQuadHelper * BlendHelper
void ActivateDrawBuffer(TextureName id)
Bind and activate draw buffers.
bool SetShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO=nullptr) override
Update the uniforms of the shader program.
Context in which a vtkRenderPass will render.
The VertexArrayObject class uses, or emulates, vertex array objects.
unsigned int TranslucentWrittenPixels
unsigned int VolumetricOcclusionQueryId
abstract class specifies interface to map data
vtkTypeUInt32 vtkMTimeType
Perform part of the rendering of a vtkRenderer.