Commit b36e2563 authored by Ken Martin's avatar Ken Martin

Add order independent translucent pass

Same speed but much better end result than the old
transparency code.

Also fix a few classes that were not passing properties
to their sub props.

Fix medical example to make opaque objects opaque.
parent 62742bfe
......@@ -211,6 +211,7 @@ int main (int argc, char *argv[])
vtkSmartPointer<vtkImageActor>::New();
sagittal->GetMapper()->SetInputConnection(sagittalColors->GetOutputPort());
sagittal->SetDisplayExtent(32,32, 0,63, 0,92);
sagittal->ForceOpaqueOn();
// Create the second (axial) plane of the three planes. We use the
// same approach as before except that the extent differs.
......@@ -224,6 +225,7 @@ int main (int argc, char *argv[])
vtkSmartPointer<vtkImageActor>::New();
axial->GetMapper()->SetInputConnection(axialColors->GetOutputPort());
axial->SetDisplayExtent(0,63, 0,63, 46,46);
axial->ForceOpaqueOn();
// Create the third (coronal) plane of the three planes. We use
// the same approach as before except that the extent differs.
......@@ -237,6 +239,7 @@ int main (int argc, char *argv[])
vtkSmartPointer<vtkImageActor>::New();
coronal->GetMapper()->SetInputConnection(coronalColors->GetOutputPort());
coronal->SetDisplayExtent(0,63, 32,32, 0,92);
coronal->ForceOpaqueOn();
// It is convenient to create an initial view of the data. The
// FocalPoint and Position form a vector direction. Later on
......
......@@ -540,43 +540,55 @@ int vtkAxisActor::RenderOpaqueGeometry(vtkViewport* viewport)
// Everything is built, just have to render
// pass keys to sub props
vtkInformation *propKeys = this->GetPropertyKeys();
if (!this->AxisHasZeroLength)
{
if (this->DrawGridlinesOnly && this->DrawGridlines)
{
// Exit !!!!
this->GridlinesActor->SetPropertyKeys(propKeys);
return this->GridlinesActor->RenderOpaqueGeometry(viewport);
}
if (this->Title != nullptr && this->Title[0] != 0 && this->TitleVisibility)
{
if (this->Use2DMode)
{
this->TitleActor2D->SetPropertyKeys(propKeys);
renderedSomething += this->TitleActor2D->RenderOpaqueGeometry(viewport);
}
else if (this->UseTextActor3D)
{
this->TitleProp3D->SetPropertyKeys(propKeys);
renderedSomething += this->TitleProp3D->RenderOpaqueGeometry(viewport);
}
else
{
this->TitleActor->SetPropertyKeys(propKeys);
renderedSomething += this->TitleActor->RenderOpaqueGeometry(viewport);
}
}
if (this->AxisVisibility)
{
this->AxisLinesActor->SetPropertyKeys(propKeys);
renderedSomething += this->AxisLinesActor->RenderOpaqueGeometry(viewport);
if (this->TickVisibility)
{
this->AxisMajorTicksActor->SetPropertyKeys(propKeys);
renderedSomething += this->AxisMajorTicksActor->RenderOpaqueGeometry(viewport);
this->AxisMinorTicksActor->SetPropertyKeys(propKeys);
renderedSomething += this->AxisMinorTicksActor->RenderOpaqueGeometry(viewport);
}
}
if (this->DrawGridlines)
{
this->GridlinesActor->SetPropertyKeys(propKeys);
renderedSomething += this->GridlinesActor->RenderOpaqueGeometry(viewport);
}
if (this->DrawInnerGridlines)
{
this->InnerGridlinesActor->SetPropertyKeys(propKeys);
renderedSomething += this->InnerGridlinesActor->RenderOpaqueGeometry(viewport);
}
if (this->LabelVisibility)
......@@ -585,14 +597,17 @@ int vtkAxisActor::RenderOpaqueGeometry(vtkViewport* viewport)
{
if (this->Use2DMode)
{
this->LabelActors2D[i]->SetPropertyKeys(propKeys);
renderedSomething += this->LabelActors2D[i]->RenderOpaqueGeometry(viewport);
}
else if (this->UseTextActor3D)
{
this->LabelActors3D[i]->SetPropertyKeys(propKeys);
renderedSomething += this->LabelActors3D[i]->RenderOpaqueGeometry(viewport);
}
else
{
this->LabelActors[i]->SetPropertyKeys(propKeys);
renderedSomething += this->LabelActors[i]->RenderOpaqueGeometry(viewport);
}
}
......@@ -601,14 +616,17 @@ int vtkAxisActor::RenderOpaqueGeometry(vtkViewport* viewport)
{
if (this->Use2DMode)
{
this->ExponentActor2D->SetPropertyKeys(propKeys);
renderedSomething += this->ExponentActor2D->RenderOpaqueGeometry(viewport);
}
else if (this->UseTextActor3D)
{
this->ExponentProp3D->SetPropertyKeys(propKeys);
renderedSomething += this->ExponentProp3D->RenderOpaqueGeometry(viewport);
}
else
{
this->ExponentActor->SetPropertyKeys(propKeys);
renderedSomething += this->ExponentActor->RenderOpaqueGeometry(viewport);
}
}
......@@ -638,24 +656,31 @@ int vtkAxisActor::RenderTranslucentPolygonalGeometry(vtkViewport* viewport)
// Everything is built, just have to render
// pass keys to sub props
vtkInformation *propKeys = this->GetPropertyKeys();
if (!this->AxisHasZeroLength && !this->DrawGridlinesOnly)
{
if (this->DrawGridpolys)
{
this->GridpolysActor->SetPropertyKeys(propKeys);
renderedSomething += this->GridpolysActor->RenderTranslucentPolygonalGeometry(viewport);
}
if (this->Title != nullptr && this->Title[0] != 0 && this->TitleVisibility)
{
if (this->Use2DMode)
{
this->TitleActor2D->SetPropertyKeys(propKeys);
renderedSomething += this->TitleActor2D->RenderTranslucentPolygonalGeometry(viewport);
}
else if (this->UseTextActor3D)
{
this->TitleProp3D->SetPropertyKeys(propKeys);
renderedSomething += this->TitleProp3D->RenderTranslucentPolygonalGeometry(viewport);
}
else
{
this->TitleActor->SetPropertyKeys(propKeys);
renderedSomething += this->TitleActor->RenderTranslucentPolygonalGeometry(viewport);
}
}
......@@ -665,14 +690,17 @@ int vtkAxisActor::RenderTranslucentPolygonalGeometry(vtkViewport* viewport)
{
if (this->Use2DMode)
{
this->LabelActors2D[i]->SetPropertyKeys(propKeys);
renderedSomething += this->LabelActors2D[i]->RenderTranslucentPolygonalGeometry(viewport);
}
else if (this->UseTextActor3D)
{
this->LabelProps3D[i]->SetPropertyKeys(propKeys);
renderedSomething += this->LabelProps3D[i]->RenderTranslucentPolygonalGeometry(viewport);
}
else
{
this->LabelActors[i]->SetPropertyKeys(propKeys);
renderedSomething += this->LabelActors[i]->RenderTranslucentPolygonalGeometry(viewport);
}
}
......@@ -680,14 +708,17 @@ int vtkAxisActor::RenderTranslucentPolygonalGeometry(vtkViewport* viewport)
{
if (this->Use2DMode)
{
this->ExponentActor2D->SetPropertyKeys(propKeys);
renderedSomething += this->ExponentActor2D->RenderTranslucentPolygonalGeometry(viewport);
}
else if (this->UseTextActor3D)
{
this->ExponentProp3D->SetPropertyKeys(propKeys);
renderedSomething += this->ExponentProp3D->RenderTranslucentPolygonalGeometry(viewport);
}
else
{
this->ExponentActor->SetPropertyKeys(propKeys);
renderedSomething += this->ExponentActor->RenderTranslucentPolygonalGeometry(viewport);
}
}
......
......@@ -2781,21 +2781,27 @@ int vtkCubeAxesActor::RenderGeometry(
this->DetermineRenderAxes(viewport);
}
// pass keys to sub props
vtkInformation *propKeys = this->GetPropertyKeys();
// Render the axes
for (i = 0; i < this->NumberOfAxesX; i++)
{
this->XAxes[this->RenderAxesX[i]]->SetPropertyKeys(propKeys);
renderedSomething +=
(this->XAxes[this->RenderAxesX[i]]->*renderMethod)(viewport);
}
for (i = 0; i < this->NumberOfAxesY; i++)
{
this->YAxes[this->RenderAxesY[i]]->SetPropertyKeys(propKeys);
renderedSomething +=
(this->YAxes[this->RenderAxesY[i]]->*renderMethod)(viewport);
}
for (i = 0; i < this->NumberOfAxesZ; i++)
{
this->ZAxes[this->RenderAxesZ[i]]->SetPropertyKeys(propKeys);
renderedSomething +=
(this->ZAxes[this->RenderAxesZ[i]]->*renderMethod)(viewport);
}
......
......@@ -69,6 +69,7 @@ set(Module_SRCS
vtkOpenGLVertexBufferObject.cxx
vtkOpenGLVertexBufferObjectCache.cxx
vtkOpenGLVertexBufferObjectGroup.cxx
vtkOrderIndependentTranslucentPass.cxx
vtkOverlayPass.cxx
vtkPixelBufferObject.cxx
vtkPointFillPass.cxx
......@@ -116,6 +117,7 @@ set(shader_files
glsl/vtkGaussianBlurPassFS.glsl
glsl/vtkGaussianBlurPassVS.glsl
glsl/vtkGlyph3DVS.glsl
glsl/vtkOrderIndependentTranslucentPassFinalFS.glsl
glsl/vtkPointGaussianVS.glsl
glsl/vtkPointGaussianGS.glsl
glsl/vtkPointFillPassFS.glsl
......
......@@ -25,6 +25,7 @@ vtk_add_test_cxx(vtkRenderingOpenGL2CxxTests tests
TestLightingMapNormalsPass.cxx
TestMultiTexturing.cxx
TestOffscreenRenderingResize.cxx
TestOrderIndependentTranslucentPass.cxx
TestPointFillPass.cxx
TestPointGaussianSelection.cxx,NO_DATA
TestPropPicker2Renderers.cxx,NO_DATA
......
/*=========================================================================
Program: Visualization Toolkit
Module: TestOpacity.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// This test covers rendering translucent materials with depth peeling
// technique.
//
// The command line arguments are:
// -I => run in interactive mode; unless this is used, the program will
// not allow interaction and exit
#include "vtkTestUtilities.h"
#include "vtkRegressionTestImage.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLRenderer.h"
#include "vtkActor.h"
#include "vtkGlyph3D.h"
#include "vtkSphereSource.h"
#include "vtkImageGridSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkImageData.h"
#include "vtkPointData.h"
#include "vtkPlaneSource.h"
#include "vtkLookupTable.h"
#include "vtkProperty.h"
#include "vtkRenderStepsPass.h"
#include "vtkOrderIndependentTranslucentPass.h"
int TestOrderIndependentTranslucentPass(int argc, char* argv[])
{
// Standard rendering classes
vtkRenderer *renderer = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->SetMultiSamples(0);
renWin->SetAlphaBitPlanes(1);
renWin->AddRenderer(renderer);
renderer->Delete();
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
renWin->Delete();
// We create a bunch of translucent spheres with an opaque plane in
// the middle
// we create a uniform grid and glyph it with a spherical shape.
// Create the glyph source
vtkSphereSource *sphere=vtkSphereSource::New();
sphere->SetRadius(1);
sphere->SetCenter(0.0,0.0,0.0);
sphere->SetThetaResolution(10);
sphere->SetPhiResolution(10);
sphere->SetLatLongTessellation(0);
vtkImageGridSource *grid=vtkImageGridSource::New();
grid->SetGridSpacing(1,1,1);
grid->SetGridOrigin(0,0,0);
grid->SetLineValue(1.0); // white
grid->SetFillValue(0.5); // gray
grid->SetDataScalarTypeToUnsignedChar();
grid->SetDataExtent(0,10,0,10,0,10);
grid->SetDataSpacing(0.1,0.1,0.1);
grid->SetDataOrigin(0.0,0.0,0.0);
grid->Update(); // to get the range
double range[2];
grid->GetOutput()->GetPointData()->GetScalars()->GetRange(range);
vtkGlyph3D *glyph=vtkGlyph3D::New();
glyph->SetInputConnection(0,grid->GetOutputPort(0));
grid->Delete();
glyph->SetSourceConnection(sphere->GetOutputPort(0));
sphere->Delete();
glyph->SetScaling(1); // on
glyph->SetScaleModeToScaleByScalar();
glyph->SetColorModeToColorByScale();
glyph->SetScaleFactor(0.05);
glyph->SetRange(range);
glyph->SetOrient(0);
glyph->SetClamping(0);
glyph->SetVectorModeToUseVector();
glyph->SetIndexModeToOff();
glyph->SetGeneratePointIds(0);
vtkPolyDataMapper *mapper=vtkPolyDataMapper::New();
mapper->SetInputConnection(glyph->GetOutputPort(0));
glyph->Delete();
// This creates a blue to red lut.
vtkLookupTable *lut = vtkLookupTable::New();
lut->SetHueRange (0.667, 0.0);
lut->SetRange(range);
mapper->SetLookupTable(lut);
lut->Delete();
mapper->SetScalarRange(range);
vtkActor *actor=vtkActor::New();
actor->SetMapper(mapper);
mapper->Delete();
renderer->AddActor(actor);
actor->Delete();
vtkProperty *property=vtkProperty::New();
property->SetOpacity(0.2);
property->SetColor(0.0,1.0,0.0);
actor->SetProperty(property);
property->Delete();
vtkPlaneSource *plane=vtkPlaneSource::New();
plane->SetCenter(0.5,0.5,0.5);
vtkPolyDataMapper *planeMapper=vtkPolyDataMapper::New();
planeMapper->SetInputConnection(0,plane->GetOutputPort(0));
plane->Delete();
vtkActor *planeActor=vtkActor::New();
planeActor->SetMapper(planeMapper);
planeMapper->Delete();
renderer->AddActor(planeActor);
vtkProperty *planeProperty=vtkProperty::New();
planeProperty->SetOpacity(1.0);
planeProperty->SetColor(1.0,0.0,0.0);
planeActor->SetProperty(planeProperty);
planeProperty->Delete();
planeProperty->SetBackfaceCulling(0);
planeProperty->SetFrontfaceCulling(0);
planeActor->Delete();
// create the basic VTK render steps
vtkNew<vtkRenderStepsPass> basicPasses;
// replace the default translucent pass with
// a more advanced depth peeling pass
vtkNew<vtkOrderIndependentTranslucentPass> peeling;
peeling->SetTranslucentPass(basicPasses->GetTranslucentPass());
basicPasses->SetTranslucentPass(peeling);
// tell the renderer to use our render pass pipeline
vtkOpenGLRenderer *glrenderer =
vtkOpenGLRenderer::SafeDownCast(renderer);
glrenderer->SetPass(basicPasses);
property->SetBackfaceCulling(1);
property->SetFrontfaceCulling(0);
// Standard testing code.
renderer->SetBackground(0.0,0.5,0.0);
renWin->SetSize(300,300);
renWin->Render();
if(renderer->GetLastRenderingUsedDepthPeeling())
{
cout<<"depth peeling was used"<<endl;
}
else
{
cout<<"depth peeling was not used (alpha blending instead)"<<endl;
}
int retVal = vtkRegressionTestImage( renWin );
if ( retVal == vtkRegressionTester::DO_INTERACTOR)
{
iren->Start();
}
// Cleanup
iren->Delete();
return !retVal;
}
5c554341d1f2e56bb9e828b9d56fa4a69cf70cb469c18e8d53d89a09781ce59fa34aad1fedc0c434291a32119cc63c058ff9455989505cd48d560389f228c89c
//VTK::System::Dec
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDepthPeelingPassFinalFS.glsl
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
in vec2 texCoord;
uniform sampler2D translucentRTexture;
uniform sampler2D translucentRGBATexture;
// the output of this shader
//VTK::Output::Dec
void main()
{
vec4 t1Color = texture(translucentRGBATexture, texCoord);
float t2Color = texture(translucentRTexture, texCoord).r;
gl_FragData[0] = vec4(t1Color.rgb/max(t2Color,0.01), t1Color.a);
// gl_FragData[0] = vec4(t1Color.a, t1Color.a, t1Color.a, 0.0);
// gl_FragData[0] = vec4(t2Color, t2Color, t2Color, 0.0);
}
......@@ -76,7 +76,7 @@ void vtkOpenGLActor::Render(vtkRenderer *ren, vtkMapper *mapper)
}
else
{
// check for deptgh peeling
// check for depth peeling
vtkInformation *info = this->GetPropertyKeys();
if (info && info->Has(vtkOpenGLActor::GLDepthMaskOverride()))
{
......
......@@ -921,6 +921,7 @@ void vtkOpenGLPointGaussianMapper::Render(
{
vtkOpenGLState *ostate = static_cast<vtkOpenGLRenderer *>(ren)->GetState();
vtkOpenGLState::ScopedglBlendFuncSeparate bfsaver(ostate);
ostate->vtkglDepthMask( GL_FALSE );
ostate->vtkglBlendFunc( GL_SRC_ALPHA, GL_ONE); // additive for emissive sources
this->RenderInternal(ren,actor);
}
......@@ -1016,7 +1017,7 @@ bool vtkOpenGLPointGaussianMapper::GetIsOpaque()
{
if (this->Emissive)
{
return false;
return true;
}
return this->Superclass::GetIsOpaque();
}
......
......@@ -31,6 +31,7 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkOpenGLFXAAFilter.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOpenGLState.h"
#include "vtkOrderIndependentTranslucentPass.h"
#include "vtkPointData.h"
#include "vtkPoints.h"
#include "vtkPolyData.h"
......@@ -70,6 +71,7 @@ vtkOpenGLRenderer::vtkOpenGLRenderer()
{
this->FXAAFilter = nullptr;
this->DepthPeelingPass = nullptr;
this->TranslucentPass = nullptr;
this->ShadowMapPass = nullptr;
this->DepthPeelingHigherLayer=0;
......@@ -431,8 +433,26 @@ void vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry()
if(!this->UseDepthPeeling)
{
// just alpha blending
this->UpdateTranslucentPolygonalGeometry();
// old code
// this->UpdateTranslucentPolygonalGeometry();
// new approach
if (!this->TranslucentPass)
{
vtkOrderIndependentTranslucentPass *oit =
vtkOrderIndependentTranslucentPass::New();
this->TranslucentPass = oit;
}
vtkTranslucentPass *tp = vtkTranslucentPass::New();
this->TranslucentPass->SetTranslucentPass(tp);
tp->Delete();
vtkRenderState s(this);
s.SetPropArrayAndCount(this->PropArray, this->PropArrayCount);
s.SetFrameBuffer(nullptr);
this->LastRenderingUsedDepthPeeling=0;
this->TranslucentPass->Render(&s);
this->NumberOfPropsRendered += this->TranslucentPass->GetNumberOfRenderedProps();
}
else // depth peeling.
{
......@@ -639,6 +659,10 @@ void vtkOpenGLRenderer::ReleaseGraphicsResources(vtkWindow *w)
{
this->DepthPeelingPass->ReleaseGraphicsResources(w);
}
if (w && this->TranslucentPass)
{
this->TranslucentPass->ReleaseGraphicsResources(w);
}
if (w && this->ShadowMapPass)
{
this->ShadowMapPass->ReleaseGraphicsResources(w);
......@@ -671,6 +695,12 @@ vtkOpenGLRenderer::~vtkOpenGLRenderer()
this->DepthPeelingPass->Delete();
this->DepthPeelingPass = nullptr;
}
if (this->TranslucentPass)
{
this->TranslucentPass->Delete();
this->TranslucentPass = nullptr;
}
}
bool vtkOpenGLRenderer::HaveApplePrimitiveIdBug()
......
......@@ -32,6 +32,7 @@ class vtkOpenGLFXAAFilter;
class vtkRenderPass;
class vtkOpenGLState;
class vtkOpenGLTexture;
class vtkOrderIndependentTranslucentPass;
class vtkTextureObject;
class vtkDepthPeelingPass;
class vtkShaderProgram;
......@@ -160,6 +161,11 @@ protected:
*/
vtkDepthPeelingPass *DepthPeelingPass;
/**
* Fallback for transparency
*/
vtkOrderIndependentTranslucentPass *TranslucentPass;
/**
* Shadows are delegated to an instance of vtkShadowMapPass
*/
......
This diff is collapsed.
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOrderIndependentTranslucentPass.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkOrderIndependentTranslucentPass
* @brief Implement OIT rendering using average color
*
* Simple version that uses average alpha weighted color
* and correct final computed alpha. Single pass approach.
*
* @sa
* vtkRenderPass, vtkTranslucentPass, vtkFramebufferPass
*/
#ifndef vtkOrderIndependentTranslucentPass_h
#define vtkOrderIndependentTranslucentPass_h
#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkOpenGLRenderPass.h"
class vtkOpenGLFramebufferObject;
class vtkTextureObject;
class vtkOpenGLRenderWindow;
class vtkOpenGLState;
class vtkOpenGLQuadHelper;
class VTKRENDERINGOPENGL2_EXPORT vtkOrderIndependentTranslucentPass
: public vtkOpenGLRenderPass
{
public:
static vtkOrderIndependentTranslucentPass *New();
vtkTypeMacro(vtkOrderIndependentTranslucentPass,vtkOpenGLRenderPass);
void PrintSelf(ostream& os, vtkIndent indent) override;
/**
* Perform rendering according to a render state \p s.
* \pre s_exists: s!=0
*/
void Render(const vtkRenderState *s) override;
/**
* Release graphics resources and ask components to release their own
* resources.
* \pre w_exists: w!=0
*/
void ReleaseGraphicsResources(vtkWindow *w) override;
//@{
/**
* Delegate for rendering the translucent polygonal geometry.
* If it is NULL, nothing will be rendered and a warning will be emitted.
* It is usually set to a vtkTranslucentPass.
* Initial value is a NULL pointer.
*/
vtkGetObjectMacro(TranslucentPass,vtkRenderPass);
virtual void SetTranslucentPass(vtkRenderPass *translucentPass);
//@}
// vtkOpenGLRenderPass virtuals:
bool PostReplaceShaderValues(std::string &vertexShader,
std::string &geometryShader,
std::string &fragmentShader,
vtkAbstractMapper *mapper,
vtkProp *prop) override;
bool SetShaderParameters(vtkShaderProgram *program,
vtkAbstractMapper *mapper, vtkProp *prop,
vtkOpenGLVertexArrayObject* VAO = nullptr) override;
// Set Opaque Z texture, this must be set from the outer FO if used
void SetOpaqueZTexture(vtkTextureObject *);
/**
* Set the format to use for the depth texture
* e.g. vtkTextureObject::Float32
*/
vtkSetMacro(DepthFormat, int);
protected:
/**
* Default constructor. TranslucentPass is set to NULL.
*/
vtkOrderIndependentTranslucentPass();
/**
* Destructor.
*/
~vtkOrderIndependentTranslucentPass() override;
vtkRenderPass *TranslucentPass;
//@{
/**
* Cache viewport values for depth peeling.
*/
int ViewportX;
int ViewportY;
int ViewportWidth;
int ViewportHeight;
//@}
vtkOpenGLFramebufferObject *Framebuffer;
vtkOpenGLQuadHelper *FinalBlend;
// obtained from the outer FO, we read from
vtkTextureObject *OpaqueZTexture;
bool OwnOpaqueZTexture;
vtkTextureObject *TranslucentRGBATexture;
vtkTextureObject *TranslucentRTexture;
vtkTextureObject *TranslucentZTexture;
int DepthFormat;
void BlendFinalPeel(vtkOpenGLRenderWindow *renWin);
// useful to store
vtkOpenGLState *State;
private:
vtkOrderIndependentTranslucentPass(const vtkOrderIndependentTranslucentPass&) = delete;
void operator=(const vtkOrderIndependentTranslucentPass&) = delete;
};
#endif
1c88065c1cd0db8333c63ab211c3c6e5aec853afabb1ceeea897422dc60c209b7dc86c8b106dbd298b798910518437ccecf6e81acce3478822dde6d2f255ff63
4d320de9d5032614f63453fd7ad7ecacf3b424921425ed4caa5e5ac5017480f91805124bb3023a7404a79fcb0b43af18ea9224f35d4ae30b13e8e8d6a3305947