Big texture into small texture pt2
https://twitter.com/AndrewNReinke/status/1438489296965492741 for the video thread detailing the whole event :)
Basically, the solution I decided upon was to simply do the two pass structure I had mentioned in the previous (https://andrewnreinke.itch.io/funmi/devlog/294176/big-texture-into-small-texture) dev(b)log.
So the common branch of assembly that's executed will simply just copy the source texture into the dest with no problems.
The not common branch is hit only if the texture's ending corner (top left) exceeds the texture's total bound (size).
So like if the source texture was 1600x1600 = 2,560,000 so if texture bound was 2,560,000 or 2,560,001 for instance, you'd just simply go and do two passes.
Part A will copy up until you hit the upper bound and once done, will reset the texture's pointer to be "at origin", so like 0,0 or maybe you have an offset like 0,0.2 or something and depends on how you index into the texture (i'm integers instead of real numbers so I can guarantee the index value 100% of the time but float really shouldn't be a huge problem in this case if you were to use them).
Part B is just the same code as the common branch IE it just copies wherever the source texture pointer is into the dest until dest is full.
And that's literally it. I did have a quite nasty bug that the twitter thread I linked captured where I just simply didn't think the problem through from the "correct" standpoint that was one of the many standpoints to solve the bug I had.
If anyone is trying something similar to what i've described in these past two devlogs and is having issues or concerns / questions, please leave a comment or mail me (info in readme) / DM me on any linked site (including this one if it's possible).
Thank you!
Files
Get Funmi
Funmi
Rotate the boat in air to get a high score
Status | In development |
Author | AndrewNReinke |
Genre | Action |
Tags | 3D, Arcade, DRM Free, handmade-engine, High Score, Low-poly, Retro, Rotation, Singleplayer, Third Person |
Languages | English, Japanese |
More posts
- Steam ReleaseDec 24, 2021
- Lots Of Changes With Text and StuffNov 19, 2021
- Text Texture AtlasNov 16, 2021
- Very Smol FixNov 15, 2021
- Font GenerationNov 14, 2021
- Added Fade In / Out And New Particle SystemNov 13, 2021
- Circular TextureNov 12, 2021
- I Wrote This Technique Thingy While Being Really Tired lmaoNov 11, 2021
- Collapsing UI Code Into One PipeNov 09, 2021
- Fixed Timers & Collision Volume BugsNov 08, 2021
Leave a comment
Log in with itch.io to leave a comment.