-
-
Notifications
You must be signed in to change notification settings - Fork 400
Closed
Labels
Description
Bug description
Getting shader compile error in vtkVolumeFS.glsl
ROR: 0:402: 'IStoVC' : no matching overloaded function found
ERROR: 0:402: '=' : dimension mismatch
ERROR: 0:402: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'
Steps to reproduce
Add these lines to VolumeMapperBlendModes example:
import vtkPlane from '@kitware/vtk.js/Common/DataModel/Plane';
actor.getProperty().setUseGradientOpacity(0, true);
const clipPlane1 = vtkPlane.newInstance();
mapper.addClippingPlane(clipPlane1);
Detailed Behavior
Trouble is somewhere around here:
vtk-js/Sources/Rendering/OpenGL/glsl/vtkVolumeFS.glsl
Lines 367 to 377 in 2dd7e3f
| // compute the normal and gradient magnitude for a position, uses forward difference | |
| #if (vtkLightComplexity > 0) || (defined vtkGradientOpacityOn) | |
| #ifdef vtkClippingPlanesOn | |
| void adjustClippedVoxelValues(vec3 pos, vec3 texPos[3], inout vec3 g1) | |
| { | |
| vec3 g1VC[3]; | |
| for (int i = 0; i < 3; ++i) | |
| { | |
| g1VC[i] = IStoVC(texPos[i]); | |
| } | |
| vec3 posVC = IStoVC(pos); |
Expected Behavior
No shader compile error.
Environment
- vtk.js version: v28.0.0
- Browsers: Chrome
- OS: Linux