Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial 35: ERROR:root:Could not set shader program #325

Closed
ada-hou opened this issue Jan 10, 2024 · 3 comments
Closed

Tutorial 35: ERROR:root:Could not set shader program #325

ada-hou opened this issue Jan 10, 2024 · 3 comments

Comments

@ada-hou
Copy link

ada-hou commented Jan 10, 2024

Describe the bug
ERROR:root:Could not set shader program

To Reproduce
Steps to reproduce the behavior:

  1. https://gemgis.readthedocs.io/en/latest/getting_started/tutorial/35_plotting_borehole_data_with_pyvista.html

  2. Follow the steps as described.

  3. I got an error on step 16 (all steps before this are fine).

    sargs = dict(fmt="%.0f", color='black')
    p = pv.Plotter(notebook=True)
    p.add_mesh(mesh,scalar_bar_args=sargs, clim=[-3500, 2000], opacity=0.7)
    p.add_point_labels(labels, "Labels", point_size=5, font_size=10)
    p.add_mesh(tubes, show_scalar_bar=False)
    p.set_background('white')
    p.show_grid(color='black')
    p.set_scale(1,1,5)
    p.show()

  4. See error
    Falling back to a static output.
    warnings.warn(
    2024-01-10 15:31:33.962 ( 137.947s) [ 8A6F] vtkShaderProgram.cxx:442 ERR| vtkShaderProgram (0x7fede0f79d40): 1: #version 150
    2: #ifdef GL_ES
    3: #ifdef GL_FRAGMENT_PRECISION_HIGH
    4: precision highp float;
    5: precision highp sampler2D;
    6: precision highp sampler3D;
    7: #else
    8: precision mediump float;
    9: precision mediump sampler2D;
    10: precision mediump sampler3D;
    11: #endif
    12: #define texelFetchBuffer texelFetch
    13: #define texture1D texture
    14: #define texture2D texture
    15: #define texture3D texture
    16: #else // GL_ES
    17: #define highp
    18: #define mediump
    19: #define lowp
    ...

2024-01-10 15:31:34.736 ( 138.721s) [ 8A6F] vtkShaderProgram.cxx:428 ERR| vtkShaderProgram (0x7fede0f79d40):
ERROR:root:Could not set shader program
2024-01-10 15:31:34.742 ( 138.727s) [ 8A6F]vtkOpenGLPolyDataMapper:2616 ERR| vtkCompositeMapperHelper2 (0x7fedd8b75c00): Could not set shader program

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [macos10.15]
  • Browser [e.g. chrome, safari]
  • Version [1.1.8]

Additional context
Add any other context about the problem here.

pandas.version = 2.0.1 pyvista.version = 0.39.1

@AlexanderJuestel
Copy link
Collaborator

Hello @ada-hou,

is there more to your Error Message? This looks more like a VTK (PyVista) error than a GemGIS error in the first place

@ada-hou
Copy link
Author

ada-hou commented Jan 10, 2024

thank for you reply! My VTK version 9

mycode:

import gemgis as gg
import pyvista as pv
import pandas as pd

file_path = ''

mesh = pv.read(file_path + 'base.vtk')

sargs = dict(fmt="%.0f", color='black')

p = pv.Plotter(notebook=False)

p.add_mesh(mesh,scalar_bar_args=sargs, clim=[-3500, 2000])

p.set_background('white')
p.show_grid(color='black')
p.set_scale(1,1,5)
p.show()

data = pd.read_csv(file_path + 'Borehole_Data.csv')
data.head()
data['formation'].unique()
color_dict = {
'OberCampanium':'#3182bd', 'UnterCampanium':'#9ecae1',
'OberSantonium': '#e6550d', 'MittelSantonium': '#fdae6b', 'UnterSantonium': '#fdd0a2',
'OberConiacium': '#31a354', 'MittelConiacium': '#74c476', 'UnterConiacium': '#a1d99b',
'OberTuronium': '#756bb1', 'MittelTuronium': '#9e9ac8', 'UnterTuronium': '#9e9ac8',
'OberCenomanium': '#636363', 'MittelCenomanium': '#969696', 'UnterCenomanium': '#d9d9d9',
'OberAlbium': '#637939', 'MittelAlbium': '#8ca252',
'EssenFM': '#e7969c', 'BochumFM': '#7b4173', 'WittenFM': '#a55194',
'Carboniferous': '#de9ed6', 'Devonian': '#de9ed6', 'Quaternary': '#de9ed6',
}
grouped = data.groupby(['Index'])
df_groups = [grouped.get_group(x) for x in grouped.groups]

list_df = gg.visualization.add_row_to_boreholes(df_groups)

list_df[0].head()

lines = gg.visualization.create_lines_from_points(df=list_df[0])
lines

tubes, df_groups = gg.visualization.create_borehole_tubes(df=data,
min_length= 10,
radius=1000)
tubes[0]

labels = gg.visualization.create_borehole_labels(df=data)
labels

tubes, labels, df_groups = gg.visualization.create_boreholes_3d(df=data,
min_length=10,
color_dict=color_dict,
radius=1000)
tubes

sargs = dict(fmt="%.0f", color='black')

p = pv.Plotter(notebook=False)

p.add_mesh(mesh,scalar_bar_args=sargs, clim=[-3500, 2000], opacity=0.7)
p.add_point_labels(labels, "Labels", point_size=5, font_size=10)
p.add_mesh(tubes, show_scalar_bar=False)

p.set_background('white')
p.show_grid(color='black')
p.set_scale(1,1,5)
p.show()

sargs = dict(fmt="%.0f", color='black')

p = pv.Plotter(notebook=False)

p.add_mesh(mesh,scalar_bar_args=sargs, clim=[-3500, 2000], opacity=0.7)
p.add_point_labels(labels, "Labels", point_size=5, font_size=10)

for j in range(len(tubes)):
df_groups[j] = df_groups[j][1:]
p.add_mesh(mesh=tubes[j], cmap=[color_dict[i] for i in df_groups[j]['formation'].unique()], show_scalar_bar=False)

p.set_background('white')
p.show_grid(color='black')
p.set_scale(1,1,5)
p.show()

all message:
(gempy2.3.1) ada@MacBook-Pro-2 GeologyModel % python 35.py
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 136.45it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 258.86it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 234.66it/s]
2024-01-10 19:21:05.897 ( 5.524s) [ 1D030] vtkShaderProgram.cxx:442 ERR| vtkShaderProgram (0x7fa1ae41d550): 1: #version 150
2: #ifdef GL_ES
3: #ifdef GL_FRAGMENT_PRECISION_HIGH
4: precision highp float;
5: precision highp sampler2D;
6: precision highp sampler3D;
7: #else
8: precision mediump float;
9: precision mediump sampler2D;
10: precision mediump sampler3D;
11: #endif
12: #define texelFetchBuffer texelFetch
13: #define texture1D texture
14: #define texture2D texture
15: #define texture3D texture
16: #else // GL_ES
17: #define highp
18: #define mediump
19: #define lowp
20: #if VERSION == 150
21: #define texelFetchBuffer texelFetch
22: #define texture1D texture
23: #define texture2D texture
24: #define texture3D texture
25: #endif
26: #endif // GL_ES
27: #define varying in
28:
29:
30: // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
31: // SPDX-License-Identifier: BSD-3-Clause
32: // Template for the polydata mappers fragment shader
33:
34: uniform int PrimitiveIDOffset;
35:
36:
37:
38: // VC position of this fragment
39: in vec4 vertexVCVSOutput;
40:
41: // Camera prop
42: uniform int cameraParallel;
43:
44:
45: // optional color passed in from the vertex shader, vertexColor
46: uniform bool OverridesColor;
47: uniform float ambientIntensity; // the material ambient
48: uniform float diffuseIntensity; // the material diffuse
49: uniform float opacityUniform; // the fragment opacity
50: uniform vec3 ambientColorUniform; // ambient color
51: uniform vec3 diffuseColorUniform; // diffuse color
52: uniform float specularIntensity; // the material specular intensity
53: uniform vec3 specularColorUniform; // intensity weighted color
54: uniform float specularPowerUniform;
55:
56:
57: // optional surface normal declaration
58: //VTK::Normal::Dec
59:
60: // extra lighting parameters
61: uniform vec3 lightColor0;
62: uniform vec3 lightDirectionVC0; // normalized
63: uniform vec3 lightColor1;
64: uniform vec3 lightDirectionVC1; // normalized
65: uniform vec3 lightColor2;
66: uniform vec3 lightDirectionVC2; // normalized
67: uniform vec3 lightColor3;
68: uniform vec3 lightDirectionVC3; // normalized
69: uniform vec3 lightColor4;
70: uniform vec3 lightDirectionVC4; // normalized
71:
72:
73: // Texture maps
74: uniform bool showTexturesOnBackface;uniform sampler2D colortexture;
75:
76:
77: // Texture coordinates
78: //VTK::TCoord::Dec
79:
80: // picking support
81: //VTK::Picking::Dec
82:
83: // Depth Peeling Support
84: //VTK::DepthPeeling::Dec
85:
86: // clipping plane vars
87: //VTK::Clip::Dec
88:
89: // the output of this shader
90: out vec4 fragOutput0;
91:
92:
93: // Apple Bug
94: //VTK::PrimID::Dec
95:
96: // handle coincident offsets
97: //VTK::Coincident::Dec
98:
99: // Value raster
100: //VTK::ValuePass::Dec
101:
102: // surface with edges
103: //VTK::Edges::Dec
104:
105: void main()
106: {
107: // VC position of this fragment. This should not branch/return/discard.
108: vec4 vertexVC = vertexVCVSOutput;
109:
110: // Place any calls that require uniform flow (e.g. dFdx) here.
111: vec3 fdx = dFdx(vertexVC.xyz);
112: vec3 fdy = dFdy(vertexVC.xyz);
113: //VTK::UniformFlow::Impl
114:
115:
116: // Set gl_FragDepth here (gl_FragCoord.z by default)
117: //VTK::Depth::Impl
118:
119: // Early depth peeling abort:
120: //VTK::DepthPeeling::PreColor
121:
122: // Apple Bug
123: //VTK::PrimID::Impl
124:
125: //VTK::Clip::Impl
126:
127: //VTK::ValuePass::Impl
128:
129: vec3 specularColor = specularIntensity * specularColorUniform;
130: float specularPower = specularPowerUniform;
131: vec4 texColor = texture(colortexture, colorTCoordVCVSOutput.st);
132: vec3 ambientColor = ambientIntensity * texColor.rgb;
133: vec3 diffuseColor = diffuseIntensity * texColor.rgb;
134: float opacity = opacityUniform * texColor.a;
135: if (OverridesColor) {
136: ambientColor = ambientColorUniform * ambientIntensity;
137: diffuseColor = diffuseColorUniform * diffuseIntensity; }
138:
139:
140: //VTK::Edges::Impl
141:
142: // Generate the normal if we are not passed in one
143: vec3 normalVCVSOutput = normalize(cross(fdx,fdy));
144: if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0normalVCVSOutput; }
145: if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0
normalVCVSOutput; }
146:
147:
148: vec3 diffuse = vec3(0,0,0);
149: vec3 specular = vec3(0,0,0);
150: float df;
151: float sf;
152: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC0));
153: diffuse += (df * lightColor0);
154: sf = sign(df)*pow(max(1e-5, dot( reflect(lightDirectionVC0, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
155: specular += (sf * lightColor0);
156: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC1));
157: diffuse += (df * lightColor1);
158: sf = sign(df)*pow(max(1e-5, dot( reflect(lightDirectionVC1, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
159: specular += (sf * lightColor1);
160: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC2));
161: diffuse += (df * lightColor2);
162: sf = sign(df)*pow(max(1e-5, dot( reflect(lightDirectionVC2, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
163: specular += (sf * lightColor2);
164: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC3));
165: diffuse += (df * lightColor3);
166: sf = sign(df)*pow(max(1e-5, dot( reflect(lightDirectionVC3, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
167: specular += (sf * lightColor3);
168: df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC4));
169: diffuse += (df * lightColor4);
170: sf = sign(df)*pow(max(1e-5, dot( reflect(lightDirectionVC4, normalVCVSOutput), normalize(-vertexVC.xyz))), specularPower);
171: specular += (sf * lightColor4);
172: diffuse = diffuse * diffuseColor;
173: specular = specular * specularColor;
174: fragOutput0 = vec4(ambientColor + diffuse + specular, opacity); //VTK::Light::Impl
175:
176: //VTK::TCoord::Impl
177:
178: if (fragOutput0.a <= 0.0)
179: {
180: discard;
181: }
182:
183: //VTK::DepthPeeling::Impl
184:
185: //VTK::Picking::Impl
186:
187: // handle coincident offsets
188: //VTK::Coincident::Impl
189: }

ERROR:root:1: #version 150
2024-01-10 19:21:05.899 ( 5.526s) [ 1D030] vtkShaderProgram.cxx:443 ERR| vtkShaderProgram (0x7fa1ae41d550): ERROR: 0:131: Use of undeclared identifier 'colorTCoordVCVSOutput'
ERROR: 0:132: Use of undeclared identifier 'texColor'
ERROR: 0:133: Use of undeclared identifier 'texColor'
ERROR: 0:134: Use of undeclared identifier 'texColor'
ERROR: 0:136: Use of undeclared identifier 'ambientColor'
ERROR: 0:137: Use of undeclared identifier 'diffuseColor'
ERROR: 0:172: Use of undeclared identifier 'diffuseColor'
ERROR: 0:174: Use of undeclared identifier 'ambientColor'
ERROR: 0:174: Use of undeclared identifier 'opacity'

ERROR:root:ERROR: 0:131: Use of undeclared identifier 'colorTCoordVCVSOutput'
2024-01-10 19:21:05.900 ( 5.527s) [ 1D030]vtkOpenGLPolyDataMapper:2616 ERR| vtkCompositeMapperHelper2 (0x7fa1ad8a1400): Could not set shader program
ERROR:root:Could not set shader program
2024-01-10 19:21:06.030 ( 5.657s) [ 1D030] vtkShaderProgram.cxx:427 ERR| vtkShaderProgram (0x7fa1ae41d550): 1: #version 150
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
9:
10:
11: // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
12: // SPDX-License-Identifier: BSD-3-Clause
13:
14: in vec4 vertexMC;
15:
16:
17:
18: // frag position in VC
19: out vec4 vertexVCVSOutput;
20:
21: // optional normal declaration
22: //VTK::Normal::Dec
23:
24: // extra lighting parameters
25: //VTK::Light::Dec
26:
27: // Texture coordinates
28: //VTK::TCoord::Dec
29:
30: // material property values
31: //VTK::Color::Dec
32:
33: // clipping plane vars
34: //VTK::Clip::Dec
35:
36: // camera and actor matrix values
37: uniform mat4 MCDCMatrix;
38: uniform mat4 MCVCMatrix;
39:
40: // Apple Bug
41: //VTK::PrimID::Dec
42:
43: // Value raster
44: //VTK::ValuePass::Dec
45:
46: // picking support
47: //VTK::Picking::Dec
48:
49: // Surface with edges on GLES 3.0
50: //VTK::EdgesGLES30::Dec
51:
52: // PointSize on GLES 3.0
53: //VTK::PointSizeGLES30::Dec
54:
55: // LineWidth on GLES 3.0
56: //VTK::LineWidthGLES30::Dec
57:
58: void main()
59: {
60: //VTK::PointSizeGLES30::Impl
61:
62: //VTK::CustomBegin::Impl
63:
64: //VTK::Color::Impl
65:
66: //VTK::Normal::Impl
67:
68: //VTK::TCoord::Impl
69:
70: //VTK::Clip::Impl
71:
72: //VTK::PrimID::Impl
73:
74: vertexVCVSOutput = MCVCMatrix * vertexMC;
75: gl_Position = MCDCMatrix * vertexMC;
76:
77:
78: //VTK::LineWidthGLES30::Impl
79:
80: //VTK::ValuePass::Impl
81:
82: //VTK::Light::Impl
83:
84: //VTK::Picking::Impl
85:
86: //VTK::CustomEnd::Impl
87:
88: //VTK::EdgesGLES30::Impl
89: }

ERROR:root:1: #version 150
2024-01-10 19:21:06.030 ( 5.657s) [ 1D030] vtkShaderProgram.cxx:428 ERR| vtkShaderProgram (0x7fa1ae41d550):
WARNING:root:ERROR: In vtkShaderProgram.cxx, line 428
vtkShaderProgram (0x7fa1ae41d550):

2024-01-10 19:21:06.030 ( 5.657s) [ 1D030]vtkOpenGLPolyDataMapper:2616 ERR| vtkCompositeMapperHelper2 (0x7fa1ad8a1400): Could not set shader program
ERROR:root:Could not set shader program
2024-01-10 19:21:06.216 ( 5.843s) [ 1D030] vtkShaderProgram.cxx:427 ERR| vtkShaderProgram (0x7fa1ae41d550): 1: #version 150
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
9:
10:
11: // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
12: // SPDX-License-Identifier: BSD-3-Clause
13:
14: in vec4 vertexMC;
15:
16:
17:
18: // frag position in VC
19: out vec4 vertexVCVSOutput;
20:
21: // optional normal declaration
22: //VTK::Normal::Dec
23:
24: // extra lighting parameters
25: //VTK::Light::Dec
26:
27: // Texture coordinates
28: //VTK::TCoord::Dec
29:
30: // material property values
31: //VTK::Color::Dec
32:
33: // clipping plane vars
34: //VTK::Clip::Dec
35:
36: // camera and actor matrix values
37: uniform mat4 MCDCMatrix;
38: uniform mat4 MCVCMatrix;
39:
40: // Apple Bug
41: //VTK::PrimID::Dec
42:
43: // Value raster
44: //VTK::ValuePass::Dec
45:
46: // picking support
47: //VTK::Picking::Dec
48:
49: // Surface with edges on GLES 3.0
50: //VTK::EdgesGLES30::Dec
51:
52: // PointSize on GLES 3.0
53: //VTK::PointSizeGLES30::Dec
54:
55: // LineWidth on GLES 3.0
56: //VTK::LineWidthGLES30::Dec
57:
58: void main()
59: {
60: //VTK::PointSizeGLES30::Impl
61:
62: //VTK::CustomBegin::Impl
63:
64: //VTK::Color::Impl
65:
66: //VTK::Normal::Impl
67:
68: //VTK::TCoord::Impl
69:
70: //VTK::Clip::Impl
71:
72: //VTK::PrimID::Impl
73:
74: vertexVCVSOutput = MCVCMatrix * vertexMC;
75: gl_Position = MCDCMatrix * vertexMC;
76:
77:
78: //VTK::LineWidthGLES30::Impl
79:
80: //VTK::ValuePass::Impl
81:
82: //VTK::Light::Impl
83:
84: //VTK::Picking::Impl
85:
86: //VTK::CustomEnd::Impl
87:
88: //VTK::EdgesGLES30::Impl
89: }

ERROR:root:1: #version 150
2024-01-10 19:21:06.216 ( 5.843s) [ 1D030] vtkShaderProgram.cxx:428 ERR| vtkShaderProgram (0x7fa1ae41d550):
WARNING:root:ERROR: In vtkShaderProgram.cxx, line 428
vtkShaderProgram (0x7fa1ae41d550):

2024-01-10 19:21:06.216 ( 5.843s) [ 1D030]vtkOpenGLPolyDataMapper:2616 ERR| vtkCompositeMapperHelper2 (0x7fa1ad8a1400): Could not set shader program
ERROR:root:Could not set shader program
2024-01-10 19:21:06.236 ( 5.862s) [ 1D030] vtkShaderProgram.cxx:427 ERR| vtkShaderProgram (0x7fa1ae41d550): 1: #version 150
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
9:
10:
11: // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
12: // SPDX-License-Identifier: BSD-3-Clause
13:
14: in vec4 vertexMC;
15:
16:
17:
18: // frag position in VC
19: out vec4 vertexVCVSOutput;
20:
21: // optional normal declaration
22: //VTK::Normal::Dec
23:
24: // extra lighting parameters
25: //VTK::Light::Dec
26:
27: // Texture coordinates
28: //VTK::TCoord::Dec
29:
30: // material property values
31: //VTK::Color::Dec
32:
33: // clipping plane vars
34: //VTK::Clip::Dec
35:
36: // camera and actor matrix values
37: uniform mat4 MCDCMatrix;
38: uniform mat4 MCVCMatrix;
39:
40: // Apple Bug
41: //VTK::PrimID::Dec
42:
43: // Value raster
44: //VTK::ValuePass::Dec
45:
46: // picking support
47: //VTK::Picking::Dec
48:
49: // Surface with edges on GLES 3.0
50: //VTK::EdgesGLES30::Dec
51:
52: // PointSize on GLES 3.0
53: //VTK::PointSizeGLES30::Dec
54:
55: // LineWidth on GLES 3.0
56: //VTK::LineWidthGLES30::Dec
57:
58: void main()
59: {
60: //VTK::PointSizeGLES30::Impl
61:
62: //VTK::CustomBegin::Impl
63:
64: //VTK::Color::Impl
65:
66: //VTK::Normal::Impl
67:
68: //VTK::TCoord::Impl
69:
70: //VTK::Clip::Impl
71:
72: //VTK::PrimID::Impl
73:
74: vertexVCVSOutput = MCVCMatrix * vertexMC;
75: gl_Position = MCDCMatrix * vertexMC;
76:
77:
78: //VTK::LineWidthGLES30::Impl
79:
80: //VTK::ValuePass::Impl
81:
82: //VTK::Light::Impl
83:
84: //VTK::Picking::Impl
85:
86: //VTK::CustomEnd::Impl
87:
88: //VTK::EdgesGLES30::Impl
89: }

ERROR:root:1: #version 150
2024-01-10 19:21:06.236 ( 5.863s) [ 1D030] vtkShaderProgram.cxx:428 ERR| vtkShaderProgram (0x7fa1ae41d550):
WARNING:root:ERROR: In vtkShaderProgram.cxx, line 428
vtkShaderProgram (0x7fa1ae41d550):

2024-01-10 19:21:06.236 ( 5.863s) [ 1D030]vtkOpenGLPolyDataMapper:2616 ERR| vtkCompositeMapperHelper2 (0x7fa1ad8a1400): Could not set shader program
ERROR:root:Could not set shader program
2024-01-10 19:21:09.360 ( 8.987s) [ 1D030] vtkShaderProgram.cxx:427 ERR| vtkShaderProgram (0x7fa1ae41d550): 1: #version 150
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
9:
10:
11: // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
12: // SPDX-License-Identifier: BSD-3-Clause
13:
14: in vec4 vertexMC;
15:
16:
17:
18: // frag position in VC
19: out vec4 vertexVCVSOutput;
20:
21: // optional normal declaration
22: //VTK::Normal::Dec
23:
24: // extra lighting parameters
25: //VTK::Light::Dec
26:
27: // Texture coordinates
28: //VTK::TCoord::Dec
29:
30: // material property values
31: //VTK::Color::Dec
32:
33: // clipping plane vars
34: //VTK::Clip::Dec
35:
36: // camera and actor matrix values
37: uniform mat4 MCDCMatrix;
38: uniform mat4 MCVCMatrix;
39:
40: // Apple Bug
41: //VTK::PrimID::Dec
42:
43: // Value raster
44: //VTK::ValuePass::Dec
45:
46: // picking support
47: //VTK::Picking::Dec
48:
49: // Surface with edges on GLES 3.0
50: //VTK::EdgesGLES30::Dec
51:
52: // PointSize on GLES 3.0
53: //VTK::PointSizeGLES30::Dec
54:
55: // LineWidth on GLES 3.0
56: //VTK::LineWidthGLES30::Dec
57:
58: void main()
59: {
60: //VTK::PointSizeGLES30::Impl
61:
62: //VTK::CustomBegin::Impl
63:
64: //VTK::Color::Impl
65:
66: //VTK::Normal::Impl
67:
68: //VTK::TCoord::Impl
69:
70: //VTK::Clip::Impl
71:
72: //VTK::PrimID::Impl
73:
74: vertexVCVSOutput = MCVCMatrix * vertexMC;
75: gl_Position = MCDCMatrix * vertexMC;
76:
77:
78: //VTK::LineWidthGLES30::Impl
79:
80: //VTK::ValuePass::Impl
81:
82: //VTK::Light::Impl
83:
84: //VTK::Picking::Impl
85:
86: //VTK::CustomEnd::Impl
87:
88: //VTK::EdgesGLES30::Impl
89: }

ERROR:root:1: #version 150
2024-01-10 19:21:09.361 ( 8.988s) [ 1D030] vtkShaderProgram.cxx:428 ERR| vtkShaderProgram (0x7fa1ae41d550):
WARNING:root:ERROR: In vtkShaderProgram.cxx, line 428
vtkShaderProgram (0x7fa1ae41d550):

2024-01-10 19:21:09.361 ( 8.988s) [ 1D030]vtkOpenGLPolyDataMapper:2616 ERR| vtkCompositeMapperHelper2 (0x7fa1ad8a1400): Could not set shader program
ERROR:root:Could not set shader program
2024-01-10 19:21:09.386 ( 9.013s) [ 1D030] vtkShaderProgram.cxx:427 ERR| vtkShaderProgram (0x7fa1ae41d550): 1: #version 150
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
9:
10:
11: // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
12: // SPDX-License-Identifier: BSD-3-Clause
13:
14: in vec4 vertexMC;
15:
16:
17:
18: // frag position in VC
19: out vec4 vertexVCVSOutput;
20:
21: // optional normal declaration
22: //VTK::Normal::Dec
23:
24: // extra lighting parameters
25: //VTK::Light::Dec
26:
27: // Texture coordinates
28: //VTK::TCoord::Dec
29:
30: // material property values
31: //VTK::Color::Dec
32:
33: // clipping plane vars
34: //VTK::Clip::Dec
35:
36: // camera and actor matrix values
37: uniform mat4 MCDCMatrix;
38: uniform mat4 MCVCMatrix;
39:
40: // Apple Bug
41: //VTK::PrimID::Dec
42:
43: // Value raster
44: //VTK::ValuePass::Dec
45:
46: // picking support
47: //VTK::Picking::Dec
48:
49: // Surface with edges on GLES 3.0
50: //VTK::EdgesGLES30::Dec
51:
52: // PointSize on GLES 3.0
53: //VTK::PointSizeGLES30::Dec
54:
55: // LineWidth on GLES 3.0
56: //VTK::LineWidthGLES30::Dec
57:
58: void main()
59: {
60: //VTK::PointSizeGLES30::Impl
61:
62: //VTK::CustomBegin::Impl
63:
64: //VTK::Color::Impl
65:
66: //VTK::Normal::Impl
67:
68: //VTK::TCoord::Impl
69:
70: //VTK::Clip::Impl
71:
72: //VTK::PrimID::Impl
73:
74: vertexVCVSOutput = MCVCMatrix * vertexMC;
75: gl_Position = MCDCMatrix * vertexMC;
76:
77:
78: //VTK::LineWidthGLES30::Impl
79:
80: //VTK::ValuePass::Impl
81:
82: //VTK::Light::Impl
83:
84: //VTK::Picking::Impl
85:
86: //VTK::CustomEnd::Impl
87:
88: //VTK::EdgesGLES30::Impl
89: }

ERROR:root:1: #version 150
2024-01-10 19:21:09.387 ( 9.014s) [ 1D030] vtkShaderProgram.cxx:428 ERR| vtkShaderProgram (0x7fa1ae41d550):
WARNING:root:ERROR: In vtkShaderProgram.cxx, line 428
vtkShaderProgram (0x7fa1ae41d550):

2024-01-10 19:21:09.387 ( 9.014s) [ 1D030]vtkOpenGLPolyDataMapper:2616 ERR| vtkCompositeMapperHelper2 (0x7fa1ad8a1400): Could not set shader program
ERROR:root:Could not set shader program
(gempy2.3.1) ada@MacBook-Pro-2 GeologyModel %

@ada-hou
Copy link
Author

ada-hou commented Jan 15, 2024

@AlexanderJuestel
Now it is working. I have just upgraded PyVista from version 0.39.1 to 0.43.2.

BUT gempy 2.3.1 depends on pyvista version 0.39.1, I am using gempy 2.3.1 in my project.

@ada-hou ada-hou closed this as completed Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants