51#ifndef vtkDualDepthPeelingPass_h
52#define vtkDualDepthPeelingPass_h
55#include "vtkRenderingOpenGL2Module.h"
82 vtkGetObjectMacro(VolumetricPass,
vtkRenderPass)
virtual void SetVolumetricPass(
180 template <
size_t NumTextures>
183 this->ActivateDrawBuffers(a.data(), a.size());
abstract class specifies interface to map data
Implement Depth Peeling for use within a framebuffer pass.
Implements the dual depth peeling algorithm.
unsigned int TranslucentOcclusionQueryId
static vtkDualDepthPeelingPass * New()
void ClearFrontDestination()
void EndTranslucentOcclusionQuery()
int TranslucentRenderCount
vtkRenderTimerLog * Timer
void ActivateDrawBuffers(const std::array< TextureName, NumTextures > &a)
Bind and activate draw buffers.
void InitializeOcclusionQuery()
bool PreReplaceVolumetricShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
void InitDepthTexture(vtkTextureObject *tex, const vtkRenderState *s)
Initialize helpers.
void DeleteOcclusionQueryIds()
TextureName DepthDestination
unsigned int OcclusionThreshold
void PeelVolumesOutsideTranslucentRange()
void EndVolumetricOcclusionQuery()
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
void RenderVolumetricPass()
Render any volumetric geometry.
void Prepare()
Fill textures with initial values, bind the framebuffer.
void ActivateDrawBuffer(TextureName id)
Bind and activate draw buffers.
void StartTranslucentOcclusionQuery()
unsigned int VolumetricOcclusionQueryId
~vtkDualDepthPeelingPass() override
vtkTimeStamp CurrentStageTimeStamp
void InitializeTargetsForVolumetricPass()
void Initialize(const vtkRenderState *state)
Allocate and configure FBOs and textures.
vtkOpenGLQuadHelper * BlendHelper
void SwapDepthBufferSourceDest()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
TextureName FrontDestination
void SetCurrentStage(ShaderStage stage)
void SwapFrontBufferSourceDest()
Swap the src/dest render targets:
vtkMTimeType GetShaderStageMTime() override
For multi-stage render passes that need to change shader code during a single pass,...
int VolumetricRenderCount
bool SetTranslucentShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO)
bool SaveScissorTestState
vtkOpenGLQuadHelper * CopyDepthHelper
void InitializeTargetsForTranslucentPass()
bool SetShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO=nullptr) override
Update the uniforms of the shader program.
void PrepareFrontDestination()
void FreeGLObjects()
Release all FBOs and textures.
vtkDualDepthPeelingPass()
void Peel()
Render the scene to produce the next set of peels.
vtkRenderPass * VolumetricPass
vtkOpenGLQuadHelper * BackBlendHelper
bool PostReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop) override
Use vtkShaderProgram::Substitute to replace.
void PeelTranslucentGeometry()
void RenderTranslucentPass()
Render the translucent pass geometry, counting number of render calls.
bool PreReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop) override
Use vtkShaderProgram::Substitute to replace.
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
void ActivateDrawBuffers(const TextureName *ids, size_t numTextures)
Bind and activate draw buffers.
unsigned int VolumetricWrittenPixels
bool PostReplaceTranslucentShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
void StartVolumetricOcclusionQuery()
void PeelVolumetricGeometry()
void CopyFrontSourceToFrontDestination()
unsigned int TranslucentWrittenPixels
vtkOpenGLQuadHelper * CopyColorHelper
bool IsRenderingVolumes()
const vtkRenderState * RenderState
void CopyOpaqueDepthBuffer()
void InitOpaqueDepthTexture(vtkTextureObject *tex, const vtkRenderState *s)
Initialize helpers.
void InitColorTexture(vtkTextureObject *tex, const vtkRenderState *s)
Initialize helpers.
void InitFramebuffer(const vtkRenderState *s)
Initialize helpers.
bool SetVolumetricShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO)
a simple class to control print indentation
Internal class which encapsulates OpenGL FramebufferObject.
Class to make rendering a full screen quad easier.
The VertexArrayObject class uses, or emulates, vertex array objects.
abstract superclass for all actors, volumes and annotations
Perform part of the rendering of a vtkRenderer.
Context in which a vtkRenderPass will render.
Asynchronously measures GPU execution times for a series of events.
The ShaderProgram uses one or more Shader objects.
abstracts an OpenGL texture object.
record modification and/or execution time
window superclass for vtkRenderWindow
vtkTypeUInt32 vtkMTimeType