Re:The joy of building a ray tracer, for fun, in Rust
by corysama on Tuesday January 04, 2022 @02:58PM
(#29799450)
I've checked the code under the hood of SDL and it does pretty much the best you can do for fast uploads of an image from the CPU to the GPU.
My CPU-based ray tracer uses the code I linked. SDL_LockTexture, go wide with threads writing into the locked buffer, SDL_UnlockTexture. If I skip the actual ray tracing, I get 1400 FPS uploading a 1024x1024 image.
My CPU-based ray tracer uses the code I linked. SDL_LockTexture, go wide with threads writing into the locked buffer, SDL_UnlockTexture. If I skip the actual ray tracing, I get 1400 FPS uploading a 1024x1024 image.