pnext / three-loader

Point cloud loader for ThreeJS, based on the core parts of Potree
Other
210 stars 90 forks source link

Phong shading is broken #47

Open rhuitl opened 5 years ago

rhuitl commented 5 years ago

The fragment shader does not compile when PointColorType is PHONG:

ERROR: 0:212: 'emissive' : undeclared identifier
ERROR: 0:212: 'ambientLightColor' : undeclared identifier
ERROR: 0:212: 'ambient' : undeclared identifier

It looks like these variables are not at all defined, should probably be uniforms.

gl_FragColor.xyz = gl_FragColor.xyz * ( emissive + totalDiffuse + ambientLightColor * ambient ) + totalSpecular;

The material does not define any of these.

hccampos commented 5 years ago

Would you like to make a PR for this? We don't use this feature and at the moment have no time for maintaining this lib.

rhuitl commented 5 years ago

It's not high priority for us either, I was just curious to see it in action. I might try to get it working when I find the time :)