Extrusion Surface encounters shader program error when light kit off
This bug is occurring in ParaView 5.5.2.
- Start ParaView
- Wavelet, set Whole Extent to [-10, 10, -10, 10, 0, 0]
- Change the representation to Extrusion Surface. All is well.
- View -> Light Inspector
- Turn off the Light Kit option. You will encounter this error:
ERROR: In /Users/kitware/dashboards/buildbot-slave/8275bd07/build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 430
vtkShaderProgram (0x7fde5ae5c350): 1: #version 150
2: #ifdef GL_ES
3: #if __VERSION__ == 300
4: #define attribute in
5: #define varying out
6: #endif // 300
7: #else // GL_ES
8: #define highp
9: #define mediump
10: #define lowp
11: #if __VERSION__ == 150
12: #define attribute in
13: #define varying out
14: #endif
15: #endif // GL_ES
16:
17:
18: /*=========================================================================
19:
20: Program: Visualization Toolkit
21: Module: vtkPolyDataVS.glsl
22:
23: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
24: All rights reserved.
25: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
26:
27: This software is distributed WITHOUT ANY WARRANTY; without even
28: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29: PURPOSE. See the above copyright notice for more information.
30:
31: =========================================================================*/
32:
33: attribute vec4 vertexMC;
34:
35: // frag position in VC
36: //VTK::PositionVC::Dec
37: uniform vec2 scalarRange;
38: uniform float extrusionFactor;
39: uniform int normalizeData;
40: in float scalar;
41: in vec3 normals;
42:
43:
44: // optional normal declaration
45: //VTK::Normal::Dec
46:
47: // extra lighting parameters
48: //VTK::Light::Dec
49:
50: // Texture coordinates
51: attribute vec2 tcoord;
52: varying vec2 tcoordVCVSOutput;
53:
54:
55: // material property values
56: //VTK::Color::Dec
57:
58: // clipping plane vars
59: //VTK::Clip::Dec
60:
61: // camera and actor matrix values
62: uniform mat4 MCDCMatrix;
63:
64: // Apple Bug
65: //VTK::PrimID::Dec
66:
67: // Value raster
68: //VTK::ValuePass::Dec
69:
70: void main()
71: {
72: //VTK::Color::Impl
73:
74: //VTK::Normal::Impl
75:
76: tcoordVCVSOutput = tcoord;
77:
78:
79: //VTK::Clip::Impl
80:
81: //VTK::PrimID::Impl
82:
83: float factor = scalar * extrusionFactor;
84: if (normalizeData != 0)
85: factor = extrusionFactor * clamp((scalar-scalarRange.x) / (scalarRange.y-scalarRange.x), 0.0, 1.0);
86: vec4 dirMC = inverse(MCVCMatrix)*normalize(MCVCMatrix*vec4(normals, 0.0));
87: vec4 newPosMC = vertexMC + factor*dirMC;
88: vertexVCVSOutput = MCVCMatrix * newPosMC;
89: gl_Position = MCDCMatrix * newPosMC;
90:
91:
92: //VTK::ValuePass::Impl
93:
94: //VTK::Light::Impl
95: }
ERROR: In /Users/kitware/dashboards/buildbot-slave/8275bd07/build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 431
vtkShaderProgram (0x7fde5ae5c350): ERROR: 0:86: Use of undeclared identifier 'MCVCMatrix'
ERROR: 0:86: Use of undeclared identifier 'MCVCMatrix'
ERROR: 0:87: Use of undeclared identifier 'dirMC'
ERROR: 0:88: Use of undeclared identifier 'vertexVCVSOutput'
ERROR: 0:88: Use of undeclared identifier 'MCVCMatrix'
ERROR: 0:88: Use of undeclared identifier 'newPosMC'
ERROR: 0:89: Use of undeclared identifier 'newPosMC'