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

Fixes issue where interpolation can cause the wrong tile to be rendered. #279

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

StarArawn
Copy link
Owner

Fixes: #269

@location(1) color: vec4<f32>,
@location(2) @interpolate(flat) tile_id: f32,
Copy link
Owner Author

Choose a reason for hiding this comment

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

Optionally we could just use a u32 here. 🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah why not use integers? that seems like the best way to ensure everything is correct

Copy link
Collaborator

@bzm3r bzm3r left a comment

Choose a reason for hiding this comment

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

These changes look good to me! I especially like that we're not using generic x, y, z, w components to refer to stuff like tile_id anymore. Makes the code much easier to read.

@StarArawn StarArawn merged commit 687cdb6 into main Sep 20, 2022
@StarArawn StarArawn deleted the fix-interpolation branch September 20, 2022 18:23
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.

Make sure uvs for the texture array-based fragment shader are not interpolated
3 participants