diff options
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> |