Skip to content
Discussion options

You must be logged in to vote

A sampler does not know or care about the texture's dimensions. It only describes how sampling should behave: filtering, address modes, mipmap filtering, comparison mode, anisotropy, and similar state.

So your shared-sampler approach is valid when all those textures should be sampled the same way. For a typical material, it is common to use one linear/repeat sampler for several maps if their sampling rules match.

The tutorial likely keeps one sampler next to each texture for clarity and flexibility. Splitting samplers becomes useful when the behavior differs, for example:

  • a shadow map needs a comparison sampler;
  • a lookup/data texture needs nearest instead of linear;
  • a UI or lookup textur…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aCactusOrSomething
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants