Streaming every Thursday at
Find more tutorials at
Learn how to optimize material performance in HLSL and Unreal Engine. I use shader compiler to analyze GPU assembly instructions (which is easier than you think!). I explain the real speed of intrinsic math operations - how expensive is sin, cos, atan in GPU cycles. I also share tips about texture sampling cost, UVs. The process applies to all real time game engines that use HLSL language: Unity, Unreal Engine, Godot
Kostas Anagnostou - How to read shader assembly:
Fabian Giesen (Ryg) - A Trip Through Graphics Pipeline:
00:00 Intro
00:05 Shader assembly. How compilers work
00:08 Basic shader in HLSL
10:00 Cost of sin instruction (sine, cosine)
12:20 Test material in UE5. Are constants optimized?
15:46 Unreal instruction count is fake
20: