How can I render a surface texture inset from the edges of the window? #2533
-
I'm looking to have bevy and tauri working together as an attempt at making a bevy editor, and I'd like a middle "viewport" to be rendered in bevy, while the surrounding area is html UI. How can I render a surface texture (eg, bevy frames) not at (0, 0), but instead indended to make room for surounding UI? In the example, the red is the rendered frame, and the white is transparent and not rendered to. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
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. |
Beta Was this translation helpful? Give feedback.
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.