By rewriting 4x4 matrix multiplication using SIMD I was able to increase the framerate of my game engine (written in C++) by 10-20% since its used so often
@jbaker_graphics Super cool! i dont think ive ever seen someone actually simulate it like this (just pictoral representations in textbooks etc). Are you simulating absorption inside the material or just dispersion?
@OlexGameDev Interesting. A pool allocator is just a more efficient way of doing that. It has O(1) complexity vs O(N) complexity for the linear search technique. But for a small # of entities it probably barely makes a difference
Every so often Il go through my codebase and replace instances of new[] or std::vector with fixed size arrays that are statically allocated at startup
Removing heap allocations makes your game FPS more stable - smoother
@OlexGameDev Looks pretty efficient. if you want to “deallocate” and reuse data chunks, you should check out a pool allocator (this is a perfect application for that). Its super simple to implement too, only a few lines of code
@MegaPunkGames I usually start by just using std vector, then once i understand how its being used in practice. I will refactor it to use a fixed buffer size
@OlexGameDev Im using Entt for the ECS but for components that are attached to large pieces of data (several MB), il usually just store a pointer to the data payload rather than try to store it in the component struct
@OlexGameDev True, and most things are actually limited in how large they can be anyways. Makes no sense to take the performance hit just to avoid having an arbitrary limit
Added a mip based bloom implementation
Does the blurring progressively over desampled buffers (2^-mip) to allow bloom to spread over the whole image cheaply
Scales as O(log(kernelSize)) and its super efficient due to z ordered texture reads