diff options
| author | y-jan137 <yousefjan24000@gmail.com> | 2026-04-29 10:55:08 +0300 |
|---|---|---|
| committer | y-jan137 <yousefjan24000@gmail.com> | 2026-04-29 10:55:08 +0300 |
| commit | 7edac8e1796e9f021c7a990e8efdfe233a8eec69 (patch) | |
| tree | 7e6cb26a25d8df1614869b2506faeb704ac3e47f /README.md | |
| parent | 063eb03c20e467c2841c53aaf1f005503ece9c89 (diff) | |
README
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 27 |
1 files changed, 20 insertions, 7 deletions
@@ -1,12 +1,25 @@ +# GPU Pixel Sort + +Inspired by <a href="https://www.youtube.com/watch?v=HMmmBDRy-jE&pp=ygUSYWNlcm9sYSBwaXhlbCBzb3J0">this video</a> + + +## Run ```bash swift build -c release -./.build/release/pixel-sort input.png output2.png --lower 0.2 --upper 0.8 --key brightness +./.build/release/pixel-sort input_img.png output_img.png [options] ``` -Performance target: 2ms max for 1080p +<div align="center"> + <img src="examples/input-626x417.png" width="49%"> + <img src="examples/output-626x417.png" width="49%"> +</div> + +<div align="center"> + <img src="examples/input-735x554.png" width="49%"> + <img src="examples/output-735x554.png" width="49%"> +</div> -Shader optimization bottlenecks: -- VRAM -- Shader code itself - - Texture sampling (memory bandwidth): precalculate sorting value (SortKey) - - +<div align="center"> + <img src="examples/input-736x736.png" width="49%"> + <img src="examples/output-736x736.png" width="49%"> +</div> |