I am trying this example (Opacity) on Ubuntu 18.04 and VTK 8.2.0.
The object is disappeared when I set the opacity value<1.0.
When both of the opacity values are less than 1.0,
When I adjust the opacity values,
I have no idea how to fix it.
Please give me some help.
Could you share the output of
Thanks for your reply.
Here is my glxinfo.
Please, check your program whether you’re not setting a
discard-containing shader code like this one:
vec4 texColor = texture(texture1, TexCoords);
if(texColor.a < 1.0)
FragColor = texColor;
Also, make sure the program is not redefining the default behavior of alpha blending via a call to
I’m sorry for my late reply.
As I am a beginner, I did not know much about in OpenGL.
In my program, there is no shader code that I created. I took time to search this:
but I did not find anything.
I got the following error everytime when opacity value is less than 1.0.
ERROR: In /home/VTK-8.2.0/Rendering/OpenGL2/vtkShaderProgram.cxx, line 446
vtkShaderProgram (0x55d9fb9540): 1:#version 320 es
2: #ifndef GL_ES
3: #define highp
4: #define mediump
5: #define lowp
6: #endif // GL_ES
7: #define attribute in
8: #define varying out
13: Program: Visualization Toolkit
14: Module: vtkPolyDataVS.glsl
16: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
17: All rights reserved.
18: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
20: This software is distributed WITHOUT ANY WARRANTY; without even
21: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22: PURPOSE. See the above copyright notice for more information.
24: ========================================================================= /
26: in vec4 vertexMC;
28: // frag position in VC
29: out vec4 vertexVCVSOutput;
31: // optional normal declaration
34: // extra lighting parameters
37: // Texture coordinates
40: // material property values
43: // clipping plane vars
46: // camera and actor matrix values
47: uniform mat4 MCDCMatrix;
48: uniform mat4 MCVCMatrix;
50: // Apple Bug
53: // Value raster
56: // picking support
59: void main()
71: vertexVCVSOutput = MCVCMatrix * vertexMC;
72: gl_Position = MCDCMatrix * vertexMC;
ERROR: In /home/VTK-8.2.0/Rendering/OpenGL2/vtkShaderProgram.cxx, line 447
It seems to me that your graphics driver is not up-to-date and/or that your graphics card is old. Lines 446 and 447 in
vtkShaderProgram.cxx are in a part of the VTK code where it calls the graphics back-end to compile a vertex shader program (the source code you see in the error message) and fails.
I recommend trying your program in hardware known to run modern 3D programs (e.g. ParaView) and see whether it works there.
Now, I am using Jetson nano with JetPack 4.6.
Still, your OpenGL backend is not compiling the shader code VTK is sending to compile. Have you considered upgrading to VTK 9.2? Its more recent shader code may compile sans issues there. If you still experience shader code failing to compile on that platform, I recommend you to report the issue in here: https://gitlab.kitware.com/vtk/vtk/-/issues