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

FR: 3d Curve Width with CurveXYZ #5

Open
LionUCS opened this issue Sep 21, 2024 · 3 comments
Open

FR: 3d Curve Width with CurveXYZ #5

LionUCS opened this issue Sep 21, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@LionUCS
Copy link

LionUCS commented Sep 21, 2024

It would be really nice if we could use a CurveXYZ or Multiple Curves to have an interpolating width curve depending on what angle the camera is viewing the polyline curve

@Firepal Firepal added the enhancement New feature or request label Sep 21, 2024
@Firepal
Copy link
Owner

Firepal commented Oct 20, 2024

We could have a single Curve defining the width for the 360° angle range, it's more efficient than doing a dot-product on a CurveXYZ.

This is easy to implement as a custom material anyway.

@LionUCS
Copy link
Author

LionUCS commented Oct 24, 2024

I couldn't figure it out. I'm' a bit lost on how the include works.

@Firepal
Copy link
Owner

Firepal commented Oct 26, 2024

Don't think too hard about what's in the include file, everything should happen in a new shader in the vertex() function. The line_*.tres shaders can be used as reference. I should really have a minimum basic shader, used to have one in the 3.x version...

I would make this shader if I was in the mindset for it.

The include system is a bit special and esoteric compared to other ways of doing shaders, but it abstracts away the complexity of line-drawing (line_process() requires 9 arguments while quick_line() requires 3), and makes the line-drawing code only concern that include file. And if one day I figure out how to do screen-space lines, that will be very simple to implement for all shaders that use polyliner_inc, simply by implementing it in that file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants