Problem with Gouraud shading and bitmap texture

Good day everyone,

I’m having difficulty with applying Gouraud shading to a textured mesh in vtk.js.

I created two meshes identically by adding points and cells from external data. Vertex normals were added to polyData in both cases as explained here, and interpolation was set to Gouraud via actor.getProperty(). One of the meshes was given a texture by adding tCoords and js image data.

The problem is that the two meshes end up being shaded differently: while the mesh without a texture is shaded smooth as expected, the textured mesh is shaded flat. Same result if interpolation is set to Phong.

I haven’t had such problem with vtk and python.

Any help will be appreciated