Skip to content

How can I render a surface texture inset from the edges of the window? #2533

Answered by cwfitzgerald
tqwewe asked this question in Q&A
Discussion options

You must be logged in to vote

You can set the viewport with https://docs.rs/wgpu/latest/wgpu/struct.RenderPass.html#method.set_viewport which will act like that part of the texture is what you're rendering to.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@tqwewe
Comment options

@cwfitzgerald
Comment options

@tqwewe
Comment options

@cwfitzgerald
Comment options

Answer selected by tqwewe
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