-
OpenGL can set texture warping like this: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); Is there something similar in wgpu? |
Beta Was this translation helpful? Give feedback.
Answered by
kpreid
Apr 18, 2022
Replies: 1 comment
-
In OpenGL, these settings are part of the texture, but in wgpu they are part of a separately created sampler, which you will use together with the texture in the shader. You construct a sampler with a |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
FishHawk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In OpenGL, these settings are part of the texture, but in wgpu they are part of a separately created sampler, which you will use together with the texture in the shader. You construct a sampler with a
SamplerDescriptor
whoseaddress_mode_*
fields are the control you're looking for.