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

fix: make ring outline determine thickness as a proportion of radius #178

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

ccarmichael-uncharted
Copy link
Collaborator

No description provided.

src/graph/nodes/ring/Ring.fs.glsl Outdated Show resolved Hide resolved
@@ -16,23 +16,13 @@ in vec2 vFromCenter;
out vec4 fragColor;

void main() {
float thickness = max(fPixelLength, min(0.1, fPixelLength * uOutline * uPixelRatio));
float antialias = min(thickness, fPixelLength * 1.5);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you removed the antialias now, that will make the rendering jaggy, should this not be added back with the new thickness checked?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would we implement it in the new context of using a proportion instead of a particular pixel length?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not compute the thickness value with the ratio? could we not pass that along withthe 0.5 offset?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in the ring shader, I assume this applies to the circle node as well? What about the other shapes? How does the thickness work for those?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change only affects the ring type node. I have not made any changes to other shapes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, but the question is should we, i assume right now the other shapes are doing what they did before, so pixel locked the outline width. All shapes/nodes should behave the same otherwise it will be very confusing to keep track of the differences.

@Nithos Nithos merged commit c6c9006 into main Mar 6, 2024
6 checks passed
@Nithos Nithos deleted the fix-ring-thickness branch March 6, 2024 17:08
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

Successfully merging this pull request may close these issues.

2 participants