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

Add support for repeating texture wrap modes. #238

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

Conversation

pcwalton
Copy link

This is a less ambitious version of #216 that should be ready to go. It changes #[image(sampler = linear)] and #[image(sampler = nearest)] to #[image(sampler(filter = linear))] and #[image(sampler(filter = nearest))] respectively. The sampler list also supports repeat and clamp modes. So, for example, you can write #[image(sampler(filter = linear, repeat)] or #[image(sampler(repeat))].

Closes #235.

This is a less ambitious version of NiklasEi#216 that should be ready to go. It
changes `#[image(sampler = linear)]` and `#[image(sampler = nearest)]`
to `#[image(sampler(filter = linear))]` and `#[image(sampler(filter =
nearest))]` respectively. The `sampler` list also supports `repeat` and
`clamp` modes. So, for example, you can write `#[image(sampler(filter =
linear, repeat)]` or `#[image(sampler(repeat))]`.

Closes NiklasEi#235.
@NiklasEi
Copy link
Owner

Thank you!
One of the examples isn't migrated yet and clippy is complaining at one point. If you prefer, I can take over the clean up, just say the word 🙂

}
}
}
Meta::Path(path) => {
Copy link
Owner

Choose a reason for hiding this comment

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

This currently allows the configuration of both clamp and repeat on the same asset. Would it maybe be better to use a named value as it's done for the filter?

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.

Add support for setting ImageAddressMode when loading images
2 participants