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

Triangular artifacts in contourFeature #832

Open
manthey opened this issue May 31, 2018 · 0 comments
Open

Triangular artifacts in contourFeature #832

manthey opened this issue May 31, 2018 · 0 comments

Comments

@manthey
Copy link
Contributor

manthey commented May 31, 2018

Because square meshes are divided into triangles for rendering, there can be a bias in how they are drawn in the contour feature (and, also, in polygons with more than three vertices and fill colors that vary by vertex). The triangular partition creates artifacts in the rendered contour.

I think the correct solution for square meshes in the contourFeature would be to modify the shaders to perform the appropriate quadrilateral interpolation. Since the vertex shader, by default, interpolates between three points, this could be done by passing the values at the four vertices, plus a value that would be 0,0, 0,1, 1,0, or 1,1 for each vertex. The vertex shader could then interpolate the 0-1 values, which would then be used in the fragment shader to compute the value.

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