Uploaded November 2021 | Updated November 2026, 3 hours ago
In this shader tutorial, I explain 3 reasons why instruction count is an unreliable method of judging the performance of a shader. In order to explain this, I also show how the shader graph gets translated into HLSL code, the code gets compiled to assembly language instructions, and then the graphics driver translates the assembly language into commands that can be executed on the specific graphics hardware. I also show a web-based tool called Shader Playground, which allows you to see how HLSL gets compiled to both ASM and low-level graphics commands for AMD graphics cards.
Shader Playground:
shader-playground.timjones.io
Here's the document I created with a list of common functions and the number of cycles required for each on Radeon hardware:
docs.google.com/spreadsheets/d/1gIlwVwO9DoQKb-7rpXhvzXcxdZSwPHs_hYHnouQtTYA
Here's last week's video on the Power nodes:
youtu.be/1EiEjynmgIY
And here's the playlist for the whole series:
youtube.com/playlist?list=PL78XDi0TS4lEBWa2Hpzg2SRC5njCcKydl
Learn more!
youtube.com/watch?v=uXO9mPHyj_Q
youtube.com/watch?v=y0QASid1v8w
Resources on the web:
https://thegamedev.guru/unity-gpu-performance/shader-cost-analysis-mali-offline-compiler/
docs.unity3d.com/Manual/shader-performance-debugging.html
Shader Book Recommendations
bencloward.com/resources_books.shtml
------------------------------
Theme Music
Peace in the Circuitry - Glitch Hop
teknoaxe.com/Link_Code_3.php?q=1526
Background Music
Speo - The Little Things
youtube.com/watch?v=aoc9v_TRBqc
#UnrealEngine #shadergraph #Unity
In this shader tutorial, I explain 3 reasons why instruction count is an unreliable method of judging the performance of a shader. In order to explain this, I also show how the shader graph gets translated into HLSL code, the code gets compiled to assembly language instructions, and then the graphics driver translates the assembly language into commands that can be executed on the specific graphics hardware. I also show a web-based tool called Shader Playground, which allows you to see how HLSL gets compiled to both ASM and low-level graphics commands for AMD graphics cards.
Shader Playground:
shader-playground.timjones.io
Here's the document I created with a list of common functions and the number of cycles required for each on Radeon hardware:
docs.google.com/spreadsheets/d/1gIlwVwO9DoQKb-7rpXhvzXcxdZSwPHs_hYHnouQtTYA
Here's last week's video on the Power nodes:
youtu.be/1EiEjynmgIY
And here's the playlist for the whole series:
youtube.com/playlist?list=PL78XDi0TS4lEBWa2Hpzg2SRC5njCcKydl
Learn more!
youtube.com/watch?v=uXO9mPHyj_Q
youtube.com/watch?v=y0QASid1v8w
Resources on the web:
https://thegamedev.guru/unity-gpu-performance/shader-cost-analysis-mali-offline-compiler/
docs.unity3d.com/Manual/shader-performance-debugging.html
Shader Book Recommendations
bencloward.com/resources_books.shtml
------------------------------
Theme Music
Peace in the Circuitry - Glitch Hop
teknoaxe.com/Link_Code_3.php?q=1526
Background Music
Speo - The Little Things
youtube.com/watch?v=aoc9v_TRBqc
#UnrealEngine #shadergraph #Unity










