Turning a simple knapsack problem into a dynamic visualization through the power of Compute Shaders.
-Important-
Viewing this video in resolutions higher than your display's resolution (e.g. watching the video at 4k on a 1080p monitor) may result in flashing artifacts. To avoid this, try setting the video resolution to match your display's resolution. This is a side effect of YouTube's compression. The actual render of this video is as lossless as possible at an insane bitrate (the render was nearly 400GB), but thanks to all of the tiny pixel "noise" in the simulation, things get lost along the way.
Written in HLSL and C#. Rendered with Unity URP. This is not a practical way to solve multidimensional multiple choice knapsack problems, but it looks nice.
Entry point for learning more about knapsack problems: https://en.wikipedia.org/wiki/Knapsac...
Music: Imagery Intelligence by Nul Tiel Records
Chapters:
0:00 Introduction to Knapsack Problems
2:19 Problem Statement
3:22 Initial Solution Steps
4:44 Finished Solution
8:09 Simulation Visualization