51 #ifndef vtkDualDepthPeelingPass_h 52 #define vtkDualDepthPeelingPass_h 54 #include "vtkRenderingOpenGL2Module.h" 81 virtual void SetVolumetricPass(
vtkRenderPass *volumetricPass);
103 bool PostReplaceTranslucentShaderValues(std::
string &vertexShader,
104 std::
string &geometryShader,
105 std::
string &fragmentShader,
108 bool PreReplaceVolumetricShaderValues(std::
string &vertexShader,
109 std::
string &geometryShader,
110 std::
string &fragmentShader,
162 void FreeGLObjects();
167 void RenderTranslucentPass();
172 void RenderVolumetricPass();
174 bool IsRenderingVolumes();
196 void InitializeOcclusionQuery();
197 void CopyOpaqueDepthBuffer();
198 void InitializeDepth();
200 void PeelVolumesOutsideTranslucentRange();
212 void PrepareFrontDestination();
213 void ClearFrontDestination();
214 void CopyFrontSourceToFrontDestination();
216 void InitializeTargetsForTranslucentPass();
217 void InitializeTargetsForVolumetricPass();
219 void PeelTranslucentGeometry();
220 void PeelVolumetricGeometry();
222 void BlendBackBuffer();
224 void StartTranslucentOcclusionQuery();
225 void EndTranslucentOcclusionQuery();
227 void StartVolumetricOcclusionQuery();
228 void EndVolumetricOcclusionQuery();
233 void SwapFrontBufferSourceDest();
234 void SwapDepthBufferSourceDest();
238 void AlphaBlendRender();
240 void BlendFinalImage();
241 void DeleteOcclusionQueryIds();
274 bool LastPeelHadVolumes;
276 unsigned int TranslucentOcclusionQueryId;
277 unsigned int TranslucentWrittenPixels;
278 unsigned int VolumetricOcclusionQueryId;
279 unsigned int VolumetricWrittenPixels;
280 unsigned int OcclusionThreshold;
282 int TranslucentRenderCount;
283 int VolumetricRenderCount;
286 bool SaveScissorTestState;
288 bool CullFaceEnabled;
295 #endif // vtkDualDepthPeelingPass_h abstract superclass for all actors, volumes and annotations
Implement an Order Independent Transparency render pass.
vtkTypeUInt32 vtkMTimeType
record modification and/or execution time
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
window superclass for vtkRenderWindow
Context in which a vtkRenderPass will render.
a simple class to control print indentation
The VertexArrayObject class uses, or emulates, vertex array objects.
Internal class which encapsulates OpenGL FramebufferObject.
static vtkDepthPeelingPass * New()
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.
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.
bool PostReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop) override
Is rendering at translucent geometry stage using depth peeling and rendering a layer other than the f...
bool SetShaderParameters(vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkProp *prop, vtkOpenGLVertexArrayObject *VAO=NULL) override
Update the uniforms of the shader program.
Perform part of the rendering of a vtkRenderer.
The ShaderProgram uses one or more Shader objects.