Error of rendering after update ami.js
- Dominant language
- JavaScript
- Stars
- 745
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I've been working with ami.js, and today I updated to the latest version of the `dev` branch. In this version was introduced the factory for stackHelper, TrackballControl, and so on..
When I changed to use the factories, I got the problem to render, I've already had a similar error described in the issue [#277](https://github.com/FNNDSC/ami/issues/277), but this time only with the latest version in all O.S. and the render is a little different, as you can see in the pictures.
> I can't use others versions of ami.js because I changed the loaders to accept cornerstone cached images objects ( I can do a pull request of it if desired)
#### Steps to Reproduce
Use the latest dev branch ami.js to build any volume rendering or slice geometry
#### Expected Results
To show the expected results I rollback to the old version the same used in the issue [#277](https://github.com/FNNDSC/ami/issues/277)
Volume Rendering

Slice

#### Actual Results
Volume Rendering

Slice

then I zoomed in the slice to see what could be happening:

When executed on `firefox` I got the following error on console:
```
THREE.WebGLShader: gl.getShaderInfoLog() vertex 0:2(12): warning: extension `GL_ARB_gpu_shader5' unsupported in vertex shader
1: precision highp float;
2: precision highp int;
3: #define SHADER_NAME ShaderMaterial
4: #define VERTEX_TEXTURES
5: #define GAMMA_FACTOR 2
6: #define MAX_DIR_LIGHTS 1
7: #define MAX_POINT_LIGHTS 0
8: #define MAX_SPOT_LIGHTS 0
9: #define MAX_HEMI_LIGHTS 0
10: #define MAX_SHADOWS 0
11: #define MAX_BONES 1019
12: #define FLIP_SIDED
13: uniform mat4 modelMatrix;
14: uniform mat4 modelViewMatrix;
15: uniform mat4 projectionMatrix;
16: uniform mat4 viewMatrix;
17: uniform mat3 normalMatrix;
18: uniform vec3 cameraPosition;
19: attribute vec3 position;
20: attribute vec3 normal;
21: attribute vec2 uv;
22: #ifdef USE_COLOR
23: attribute vec3 color;
24: #endif
25: #ifdef USE_MORPHTARGETS
26: attribute vec3 morphTarget0;
27: attribute vec3 morphTarget1;
28: attribute vec3 morphTarget2;
29: attribute vec3 morphTarget3;
30: #ifdef USE_MORPHNORMALS
31: attribute vec3 morphNormal0;
32: attribute vec3 morphNormal1;
33: attribute vec3 morphNormal2;
34: attribute vec3 morphNormal3;
35: #else
36: attribute vec3 morphTarget4;
37: attribute vec3 morphTarget5;
38: attribute vec3 morphTarget6;
39: attribute vec3 morphTarget7;
40: #endif
41: #endif
42: #ifdef USE_SKINNING
43: attribute vec4 skinIndex;
44: attribute vec4 skinWeight;
45: #endif
48: varying vec4 vPos;
49:
50: //
51: // main
52: //
53: void main() {
55: vPos = modelMatrix * vec4(position, 1.0 );
56: gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0 );
58: }
```
So I don't know where to start diving to get this fixed. I believe it could be related to the three.js version, but If someone could give me some direction, I would appreciate. When I discover what's going on, I post the fix here or do a pull request
### Browsers Affected
- [ ] All
- [X] Chrome
- [X] Firefox
- [ ] Edge *not tested*
- [ ] Safari 9 *not tested*
- [ ] Safari 8 *not tested*
- [ ] IE 11 *not tested*
### Versions
- AMI: latest `dev` branch
- THREEJS: revision 73
Thanks,
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.