← All resources

I made this shader run 5x faster

Blog Advanced

Jan Mróz

Proposed by Jan Mróz

Visit resource ↗

Description

I made this shader run 5x faster is Jan Mróz's optimization case study porting an old ShaderToy cellular-noise effect into Unity HLSL and iterating with Nvidia Nsight Graphics. The original layers animated Voronoi and value-noise-distorted UVs entirely in ALU without texture assets.

Mróz profiles stall reasons, moves work into texture units where parallel sampling helps, reduces neighbour searches and iteration counts, and documents assembly-level reasoning across optimization passes until frame cost drops by roughly five times on his test GPU.

Advanced shader authors comfortable reading Nsight range profiles and HLSL disassembly will follow the loop. The starting snippet is intentionally messy student-era code meant for experimentation.

The article is a free long post on proceduralpixels.com with GitLab snippet links and before-and-after captures.

It pairs with the GPU pipeline benchmarking slides and editor Nsight article as a practical shader tuning trilogy on Procedural Pixels.