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

useEDL not works , exception : Fragment shader is not compiled. #28

Closed xiemeilong closed 1 year ago

xiemeilong commented 1 year ago

Set material.useEDL = true will throw excetpion :

THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false

Program Info Log: Fragment shader is not compiled.

FRAGMENT

ERROR: 0:275: 'gl_FragColor' : undeclared identifier
ERROR: 0:275: 'a' :  field selection requires structure, vector, or interface block on left hand side
ERROR: 0:275: 'assign' : l-value required (can't modify a const)

  270:          gl_FragColor.a = log2(linearDepth);
  271:      #endif
  272:      
  273:  #else
  274:      #if defined(use_edl)
> 275:          gl_FragColor.a = vLogDepth;
  276:      #endif
  277:  #endif
  278: 
  279:  #ifdef highlight_point
  280:      if (vHighlight > 0.0) {
  281:          gl_FragColor = highlightedPointColor;