Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to use interpolated shader / paraboloid point shape? #11

Open
shiukaheng opened this issue Oct 29, 2019 · 0 comments
Open

Possible to use interpolated shader / paraboloid point shape? #11

shiukaheng opened this issue Oct 29, 2019 · 0 comments

Comments

@shiukaheng
Copy link

shiukaheng commented Oct 29, 2019

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 shiukaheng changed the title Possible to use interpolated shader / parabolic point shape? Possible to use interpolated shader / paraboloid point shape? Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant