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

Wide line PoC (Metal Custom Layer) #2112

Draft
wants to merge 68 commits into
base: main
Choose a base branch
from
Draft

Wide line PoC (Metal Custom Layer) #2112

wants to merge 68 commits into from

Conversation

stefankarschti
Copy link
Collaborator

@stefankarschti stefankarschti commented Feb 14, 2024

Implement wide line vectors as a Custom (raw) Metal layer by adapting code from WhirlyGlobe.

stefankarschti and others added 30 commits January 19, 2024 15:55
@stefankarschti
Copy link
Collaborator Author

image

@stefankarschti stefankarschti changed the title Wide line GPU implementation (Metal) Wide line PoC (Metal Custom Layer) Mar 5, 2024
@stefankarschti stefankarschti marked this pull request as ready for review March 5, 2024 20:17
Copy link
Collaborator

@louwers louwers left a comment

Choose a reason for hiding this comment

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

It's a cool POC, but I don't think it practical to have source code with different licenses in the same root, even if it's just the sample app and not part of the library.

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Mar 5, 2024

It's a cool POC, but I don't think it practical to have source code with different licenses in the same root, even if it's just the sample app and not part of the library.

Oh right, we need to address that. I own that code and I can grant whatever rights you want. What's the copyright for new MapLibre code look like?

@louwers
Copy link
Collaborator

louwers commented Mar 5, 2024

@sjg-wdw That would be great. This is the license for MapLibre Native: https://github.com/maplibre/maplibre-native/blob/main/LICENSE.md

So the copyright specifically is Copyright (c) 2021 MapLibre contributors

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Mar 6, 2024

Stefan has my permission to change the copyright on those files to MapLibre contributors. Let me know if you need that permission in some other form.

@louwers
Copy link
Collaborator

louwers commented Mar 6, 2024

@stefankarschti Could you remove the copyright header, and then clarify with Steve that the following is true:

Whenever you make a contribution to a repository containing notice of a license, you license your contribution under the same terms, and you agree that you have the right to license your contribution under those terms.

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Mar 6, 2024

@stefankarschti Could you remove the copyright header, and then clarify with Steve that the following is true:

Whenever you make a contribution to a repository containing notice of a license, you license your contribution under the same terms, and you agree that you have the right to license your contribution under those terms.

Yes, that's fine with me. I grant permission on behalf of mousebird consulting.

return { .valid = false };
}

const float tA = (a0.x * a1.y - a0.y * a1.x);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mostly the same shader source as before here? Refer to #2183 for previous nits I had in this shader.

// Note that `inst[2].totalLen` wraps to zero at the end, and we don't want that.
// Texture coords are used for edge blending, so we need to set them up even if there are no textures.
float texY = 0;
float texX = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like texture support was removed from this shader, I see some texcoord manipulation commented out in a few places. Could you remove these references?

struct TriWideArgBufferFrag {
UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]];
UniformWideVec wideVec [[ id(WKSUniformWideVecEntry) ]];
bool hasTextures;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unused?

}

struct TriWideArgBufferFrag {
UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unused?

@stefankarschti stefankarschti marked this pull request as draft April 17, 2024 19:46
@stefankarschti stefankarschti removed their assignment May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

4 participants