Who's wrong? SystemInfo.graphicsShaderLevel or Intel/Wikipedia?

Hi guys,

I’ve got SystemInfo.graphicsShaderLevel and the internet arguing about what shadermodel my desktop machine is supposed to support. The ‘card’ is an integrated intel gpu: The Intel HD Graphics 4000. Shooting the SystemInfo.graphicsShaderLevel into the console gives me “30”, which indicates Shader Model 3.0 according to the docs, but every website I check claims the HD Graphics 4000 supports Shader Model 5.0, e.g. Wikipedia here, in the section under Ivy Bridge:

And Intel’s own site, here:

http://www.intel.com/support/graphics/sb/CS-033757.htm?wapkw=4th+generation+intel+core+processors+with+intel+hd+graphics+4000

I confirmed on Intel’s site that I’m running the latest drivers. So, err… What gives? Who’s right? Can I expect access to DirectX11 features like they say, or is Unity actually revealing that they’re all full of baloney? :slight_smile:

the HD 4000 does support DirectX 11 features. What it doesn’t really have is the muscle to actually back that up - as a result you should probably expect things to ‘work’, but not always be realistically playable.

As a side note, if you’re on a desktop, do yourself a favour and pick up at least a mid-tier discrete graphics card - you won’t regret it :wink:

I can’t. :wink: This is my work computer. I have to develop on this GPU, because it’s the GPU that also resides in all my end-users’ laptops. So I’m running this GPU on purpose to get my dev environment closer to the target users’.

I understand that the HD Graphics 4000 is somewhat of a weakling compared to dedicated graphics hardware, but the support reported by Unity3D should concern itself only with what the graphics card claims it can do, not whether it has the muscle to back it up. If the card is spec’ed for DX11, SystemInfo.graphicsShaderLevel should return 50. But it doesn’t, it returns 30, and that’s a mystery to me. O_O

I just did an additional test: Created a shader with the default stub code, and then added #pragma target 5.0 to its CGPROGRAM compiler directives. No problem. It compiles without warnings.

I think SystemInfo.graphicsShaderLevel lies to me. :smiley:

Yeah, it’s indeed lying to you. If you’re developing with an HD4000 in mind, it may be better to be compiling for shader model 3 anyway, just to force yourself to be performance minded - but obviously that’s your call!

I’m going to have to revise my previous comments. The shader I wrote with #pragma target 5.0 does indeed compile without warnings, but what I hadn’t noticed first time around is that it automatically reduces the Shader Model of its vertex/fragment shaders to “SM2.0” when I view it in the inspector after compilation. The maximum Shader Model I could get it to accept without falling back to 2.0 is 3.0, so apparently, the shader compiler does in fact obey the max Shader Model number reported by SystemInfo.graphicsShaderLevel.

In conclusion: The specs claimed by Intel and this GPU’s wiki page are not available in Unity. It simply won’t support any SM higher than 3.

That’s a bummer.

They are available, but only when using the HLSL compiler (Running Unity in DX11 mode).

Awesome! I did not know you had to enable that manually. :smiley:

I ticked the DirectX11 box under PlayerSettings, and now the shaders accept #pragma target 5.0 without reverting back to 2. That’s great! Thanks a bunch. :slight_smile: