How do I render part of one texture into a larger texture? #11739
Replies: 1 comment
-
Reading an in-depth wgsl shader tutorial is helping. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to port an existing pixel game to bevy. My existing game will work provided that I provide a function
blit_sub
which draws a sub-rectangle of a spritesheet to the screen at a specific XY location. I know this seems quite anti-paradigmatic, but if I can make this work, then Bevy can essentially compete with a raylib-ish experience.My current ideas of how to approach this, and their roadblocks, are
Image
(see the pixel aligned example) somehow. Problem is, I can't figure out where to look for this, and I want it to work from GPU textures.Note that the actual image data doesn't need to pass through my blit_sub; just the XY and rect bounds. The actual spritesheet is assumed to be peesent in bevy.
Any advice?
Beta Was this translation helpful? Give feedback.
All reactions