tentone / potree-core

Potree point cloud viewer library core components for easier integration in a three.js project.
https://tentone.github.io/potree-core/
Other
171 stars 53 forks source link

Shader version error with three >0.152 #35

Closed charlesritchea closed 1 month ago

charlesritchea commented 12 months ago

I have to set "three": "0.152.0" in order to get it to load, when I do anything higher I get:


Program Info Log: Vertex shader is not compiled.

VERTEX

ERROR: 0:3: 'version' : #version directive must occur before anything else, except for comments and white space
ERROR: 0:21: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:22: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:23: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:24: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:25: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:26: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:27: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:28: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:93: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:94: 'out' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:98: 'out' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:200: 'round' : no matching overloaded function found
ERROR: 0:202: 'texture' : no matching overloaded function found
ERROR: 0:202: '=' : dimension mismatch
ERROR: 0:202: '=' : cannot convert from 'const mediump float' to 'highp 4-component vector of float'
ERROR: 0:203: 'round' : no matching overloaded function found
ERROR: 0:207: 'round' : no matching overloaded function found
ERROR: 0:208: 'round' : no matching overloaded function found
ERROR: 0:334: 'texture' : no matching overloaded function found
ERROR: 0:334: 'rgb' :  field selection requires structure or vector on left hand side
ERROR: 0:334: '=' : dimension mismatch
ERROR: 0:334: '=' : cannot convert from 'const mediump float' to 'highp 3-component vector of float'
ERROR: 0:341: 'texture' : no matching overloaded function found
ERROR: 0:341: '=' : dimension mismatch
ERROR: 0:341: '=' : cannot convert from 'const mediump float' to 'highp 4-component vector of float'
ERROR: 0:362: 'texture' : no matching overloaded function found
ERROR: 0:362: 'rgb' :  field selection requires structure or vector on left hand side
ERROR: 0:362: 'return' : function return is not matching type:
ERROR: 0:419: 'mix' : no matching overloaded function found
ERROR: 0:419: 'return' : function return is not matching type:
ERROR: 0:425: 'mix' : no matching overloaded function found
ERROR: 0:425: 'return' : function return is not matching type:

  1: #define SHADER_TYPE RawShaderMaterial
  2: #define SHADER_NAME 
> 3: #version 300 es
  4: 
  5: 
  6: #define tree_type_octree
  7: #define adaptive_point_size
  8: #define square_point_shape
  9: #define color_type_rgb
FRAGMENT

ERROR: 0:3: 'version' : #version directive must occur before anything else, except for comments and white space
ERROR: 0:35: 'out' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:44: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
ERROR: 0:48: 'in' : storage qualifier supported in GLSL ES 3.00 and above only

  1: #define SHADER_TYPE RawShaderMaterial
  2: #define SHADER_NAME 
> 3: #version 300 es
  4: 
  5: 
  6: #define tree_type_octree
  7: #define adaptive_point_size
  8: #define square_point_shape
  9: #define color_type_rgb
berry4u commented 11 months ago

the same problem for me

DJ-caddev commented 11 months ago

Should be fixed with #31

@tentone might need to update the version number and deploy a new version on NPM.

tentone commented 11 months ago

Hello

Thanks a lot for reporting will check with the latest version.

Thanks!

geoff-harper commented 9 months ago

@tentone the merge re the webgl version from July fixes my shader issues, can it get tagged and pushed to npm? There's also a couple stray logs being printed I noticed

tentone commented 9 months ago

Hello

Thanks a lot for noticing. Published a new version 2.0.7