potree-core icon indicating copy to clipboard operation
potree-core copied to clipboard

Possible to use interpolated shader / paraboloid point shape?

Open shiukaheng opened this issue 5 years ago • 0 comments

Hi, and thanks for the hard work! I tried switching to Potree.PointShape.PARABOLOID for material.shape, but ended up with WebGL throwing errors on undefined terms. After some digging in Potree I found that I needed to get extensions from WebGL by the getExtension method as follows: let gl = renderer.getContext(); gl.getExtension('EXT_frag_depth'); gl.getExtension('WEBGL_depth_texture'); let extVAO = gl.getExtension('OES_vertex_array_object'); if(!extVAO){ throw new Error("OES_vertex_array_object extension not supported"); } However, it still calculates scene depth incorrectly. I'm not familiar with WebGL at all, but removing the line pos.z += wi * vRadius; in the fragment shader makes it render correctly again, albiet without the paraboloid depth applied to the square shapes. Perhaps vRadius is somehow passed down incorrectly?

Thanks, Heng.

shiukaheng avatar Oct 29 '19 17:10 shiukaheng