51 #ifndef vtkDualDepthPeelingPass_h 52 #define vtkDualDepthPeelingPass_h 54 #include "vtkRenderingOpenGL2Module.h" 82 virtual void SetVolumetricPass(
vtkRenderPass *volumetricPass);
104 bool PostReplaceTranslucentShaderValues(std::
string &vertexShader,
105 std::
string &geometryShader,
106 std::
string &fragmentShader,
109 bool PreReplaceVolumetricShaderValues(std::
string &vertexShader,
110 std::
string &geometryShader,
111 std::
string &fragmentShader,
157 void SetCurrentStage(ShaderStage stage);
163 void FreeGLObjects();
168 void RenderTranslucentPass();
173 void RenderVolumetricPass();
175 bool IsRenderingVolumes();
197 void InitializeOcclusionQuery();
198 void CopyOpaqueDepthBuffer();
199 void InitializeDepth();
201 void PeelVolumesOutsideTranslucentRange();
213 void PrepareFrontDestination();
214 void ClearFrontDestination();
215 void CopyFrontSourceToFrontDestination();
217 void InitializeTargetsForTranslucentPass();
218 void InitializeTargetsForVolumetricPass();
220 void PeelTranslucentGeometry();
221 void PeelVolumetricGeometry();
223 void BlendBackBuffer();
225 void StartTranslucentOcclusionQuery();
226 void EndTranslucentOcclusionQuery();
228 void StartVolumetricOcclusionQuery();
229 void EndVolumetricOcclusionQuery();
234 void SwapFrontBufferSourceDest();
235 void SwapDepthBufferSourceDest();
239 void AlphaBlendRender();
241 void BlendFinalImage();
242 void DeleteOcclusionQueryIds();
276 bool LastPeelHadVolumes;
278 unsigned int TranslucentOcclusionQueryId;
279 unsigned int TranslucentWrittenPixels;
280 unsigned int VolumetricOcclusionQueryId;
281 unsigned int VolumetricWrittenPixels;
282 unsigned int OcclusionThreshold;
284 int TranslucentRenderCount;
285 int VolumetricRenderCount;
288 bool SaveScissorTestState;
290 bool CullFaceEnabled;
297 #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.
Asynchronously measures GPU execution times for a series of events.
The ShaderProgram uses one or more Shader objects.