51 #ifndef vtkDualDepthPeelingPass_h 52 #define vtkDualDepthPeelingPass_h 55 #include "vtkRenderingOpenGL2Module.h" 82 vtkGetObjectMacro(VolumetricPass,
vtkRenderPass)
virtual void SetVolumetricPass(
140 void SetCurrentStage(ShaderStage stage);
141 vtkSetMacro(CurrentPeelType, PeelType);
146 void FreeGLObjects();
151 void RenderTranslucentPass();
156 void RenderVolumetricPass();
158 bool IsRenderingVolumes();
180 template <
size_t NumTextures>
183 this->ActivateDrawBuffers(a.data(), a.size());
185 void ActivateDrawBuffers(
const TextureName* ids,
size_t numTextures);
193 void InitializeOcclusionQuery();
194 void CopyOpaqueDepthBuffer();
195 void InitializeDepth();
197 void PeelVolumesOutsideTranslucentRange();
209 void PrepareFrontDestination();
210 void ClearFrontDestination();
211 void CopyFrontSourceToFrontDestination();
213 void InitializeTargetsForTranslucentPass();
214 void InitializeTargetsForVolumetricPass();
216 void PeelTranslucentGeometry();
217 void PeelVolumetricGeometry();
219 void BlendBackBuffer();
221 void StartTranslucentOcclusionQuery();
222 void EndTranslucentOcclusionQuery();
224 void StartVolumetricOcclusionQuery();
225 void EndVolumetricOcclusionQuery();
230 void SwapFrontBufferSourceDest();
231 void SwapDepthBufferSourceDest();
235 void AlphaBlendRender();
237 void BlendFinalImage();
238 void DeleteOcclusionQueryIds();
282 #endif // vtkDualDepthPeelingPass_h abstract superclass for all actors, volumes and annotations
void ActivateDrawBuffers(const std::array< TextureName, NumTextures > &a)
Bind and activate draw buffers.
Implement Depth Peeling for use within a framebuffer pass.
const vtkRenderState * RenderState
bool SaveScissorTestState
unsigned int TranslucentOcclusionQueryId
vtkTypeUInt32 vtkMTimeType
vtkOpenGLQuadHelper * BackBlendHelper
vtkOpenGLQuadHelper * CopyDepthHelper
record modification and/or execution time
unsigned int VolumetricWrittenPixels
vtkTimeStamp CurrentStageTimeStamp
TextureName DepthDestination
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
window superclass for vtkRenderWindow
unsigned int OcclusionThreshold
Context in which a vtkRenderPass will render.
a simple class to control print indentation
The VertexArrayObject class uses, or emulates, vertex array objects.
int VolumetricRenderCount
Internal class which encapsulates OpenGL FramebufferObject.
vtkOpenGLQuadHelper * CopyColorHelper
int TranslucentRenderCount
static vtkDepthPeelingPass * New()
abstract class specifies interface to map data
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...
abstracts an OpenGL texture object.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkRenderPass * VolumetricPass
vtkOpenGLQuadHelper * BlendHelper
virtual vtkMTimeType GetShaderStageMTime()
For multi-stage render passes that need to change shader code during a single pass, use this method to notify a mapper that the shader needs to be rebuilt (rather than reuse the last cached shader.
Implements the dual depth peeling algorithm.
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
Class to make rendering a full screen quad easier.
void ActivateDrawBuffer(TextureName id)
Bind and activate draw buffers.
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...
bool SetShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO=nullptr) override
Update the uniforms of the shader program.
vtkRenderTimerLog * Timer
Perform part of the rendering of a vtkRenderer.
unsigned int TranslucentWrittenPixels
unsigned int VolumetricOcclusionQueryId
TextureName FrontDestination
Asynchronously measures GPU execution times for a series of events.
The ShaderProgram uses one or more Shader objects.