Skip to content

improve wireframe poly of meshes significantly #4961

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SimonDanisch
Copy link
Member

 poly(Sphere(Point3f(0), 1), color=:white, strokewidth=1, strokecolor=:black, shading=true)

image

@github-project-automation github-project-automation bot moved this to Work in progress in PR review May 9, 2025
@SimonDanisch SimonDanisch requested a review from ffreyer May 9, 2025 09:44
@SimonDanisch
Copy link
Member Author

For full effect, I needed a much larger depth_shift.
@ffreyer, I guess the correct value is a bit scene dependent?

@MakieBot
Copy link
Collaborator

MakieBot commented May 9, 2025

Benchmark Results

SHA: 2a01c778515656b334f8645d9fe35ac6e7f4dfb9

Warning

These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking.

GLMakie
CairoMakie
WGLMakie

@jkrumbiegel
Copy link
Member

One problem might be if you have folds or creases in the mesh, then depth shift might pull the lines from the back through the front. That's why I still think mesh + wireframes should be a separate shader where the distance from the face edge determines whether you draw stroke color or face color

@SimonDanisch
Copy link
Member Author

That's why I still think mesh + wireframes should be a separate shader

I think so too, but its just so much work :D

@SimonDanisch
Copy link
Member Author

Well, I guess the reference images show we cant just up the depth_shift that much ^^

@ffreyer
Copy link
Collaborator

ffreyer commented May 9, 2025

For full effect, I needed a much larger depth_shift. @ffreyer, I guess the correct value is a bit scene dependent?

Depth shift applies in clip space so no matter what your camera does, you're always acting on a -1..1 range (or was it 0..1, I always forget)

One problem might be if you have folds or creases in the mesh, then depth shift might pull the lines from the back through the front.

Yea pretty much. You shift the lines forward so if your mesh is thinner in clip space than depth_shift the lines from the backside will poke through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Work in progress
Development

Successfully merging this pull request may close these issues.

4 participants