Skip to content

Can't change default image sampler - DefaultImageSampler tuple field is pub(crate) #5046

Answered by DJMcNab
sarkahn asked this question in Q&A
Discussion options

You must be logged in to vote

You should set the default_sampler field on ImageSettings.

The DefaultImageSampler gets set based on that:

let default_sampler = {
let device = render_app.world.resource::<RenderDevice>();
device.create_sampler(&default_sampler)
};

Notice that ImageSettings is a main world resource, whereas DefaultImageSampler is a render world resource.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sarkahn
Comment options

@sarkahn
Comment options

@DJMcNab
Comment options

Answer selected by sarkahn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
A-Rendering Drawing game state to the screen
2 participants
Converted from issue

This discussion was converted from issue #5045 on June 18, 2022 15:57.