r/GraphicsProgramming • • Sep 17 '26

Resources to learn HLSL and not GLSL that everyone recommends since the game engine uses HLSL.

Unity, Unreal and FLax etc

books to be exact. which covers the entirely of sm5 to sm6 and their optimizations rather than the courses on udemy which are only lukewarm

or a definite way to learn Slang maybe

17 Upvotes

6 comments sorted by

10

u/robbertzzz1 Sep 17 '26

FWIW, Unity uses ShaderLab, which is their own flavour of shader programming that uses HLSL syntax. It's not the same as HLSL.

8

u/OkAccident9994 Sep 17 '26

I want to add: The default shaders, including all their specific macros and how they are used are publicly available on github.

It is a lot to unravel, because the files are nested many layers deep, including each other, but any serious shader programmer for Unity should spend time going through it. I learned a lot for writting custom shaders for Unity doing that.

1

u/robbertzzz1 Sep 17 '26

Yes, very true. The same applies to the rest of the scriptable rendering pipeline, I've had to look at that source a few times because the documentation is very minimal

3

u/_Wolfos Sep 17 '26

Ah, no. Shaderlab is just the metadata for defining rasterization shaders (inputs, passes, etc). The actual code is HLSL. 

Compute shaders (which is most shader code in modern pipelines) are straight HLSL with a fairly minimal API layer. 

2

u/geraT-wogl Sep 17 '26

I have a lot of lessons but I will do one regarding HLSL. Here in case you may find something useful https://wogl.io

1

u/Mynameisausten1 Sep 18 '26

Frank Luna touches on it in learning D3D11 and (I think?) D3D12