You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 3DS does not have much RAM, a large image might end up filling the whole RAM if downloaded, swizzled, then uploaded to a texture.
Instead, you may want a custom image loader, in which you use chunked transfering, in ehttp terms, this is streaming, in minreq terms, this is .send_lazy.
For PNG, if i remember correctly, you only need to know the pixel above and the pixel to the left to decode a pixel, so you will be storing at most two rows of pixels, the width of the image, to decode.
You may want to do some form of either sampling a pixel every so often to be loaded into the texture, or storing rolling sums that, when filled, are divided by however many pixels that rolling sum stores, and you generate what could be thought of as an "on the fly mipmap".
For JPEG, you may be able to make use of the properties of sin and cos (and the way their integrals work) to convert the blocks into "average color", and then store and convert those blocks into pixels.
Note that the 3DS seems to bork out if using a texture with a side length greater than 1024, so unless the server you're connecting to has some sort of https://somecdn/image/keysmash?format=FORMAT&width=WIDTH&height=HEIGHT, you're going to have to either create a proxy server that can more easily transcode images, likely using imagemagick, which the 3DS then loads trivially, at least under egui with egui_extras, or you're going to have to implement these custom loading routines.
If you do implement these custom loading routines, let the rust3ds team know, so others may use your hard work.
The text was updated successfully, but these errors were encountered:
The 3DS does not have much RAM, a large image might end up filling the whole RAM if downloaded, swizzled, then uploaded to a texture.
Instead, you may want a custom image loader, in which you use chunked transfering, in
ehttp
terms, this isstreaming
, inminreq
terms, this is.send_lazy
.For PNG, if i remember correctly, you only need to know the pixel above and the pixel to the left to decode a pixel, so you will be storing at most two rows of pixels, the width of the image, to decode.
You may want to do some form of either sampling a pixel every so often to be loaded into the texture, or storing rolling sums that, when filled, are divided by however many pixels that rolling sum stores, and you generate what could be thought of as an "on the fly mipmap".
For JPEG, you may be able to make use of the properties of
sin
andcos
(and the way their integrals work) to convert the blocks into "average color", and then store and convert those blocks into pixels.Note that the 3DS seems to bork out if using a texture with a side length greater than 1024, so unless the server you're connecting to has some sort of
https://somecdn/image/keysmash?format=FORMAT&width=WIDTH&height=HEIGHT
, you're going to have to either create a proxy server that can more easily transcode images, likely using imagemagick, which the 3DS then loads trivially, at least underegui
withegui_extras
, or you're going to have to implement these custom loading routines.If you do implement these custom loading routines, let the rust3ds team know, so others may use your hard work.
The text was updated successfully, but these errors were encountered: