Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

SystemInfo.graphicsShaderLevel

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static var graphicsShaderLevel: int;
public static int graphicsShaderLevel;

Description

Graphics device shader capability level (Read Only).

This is approximate "shader capability" level of the graphics device, expressed in DirectX shader model terms. Possible values are:

50 Shader Model 5.0 (DX11.0)
41 Shader Model 4.1 (DX10.1)
40 Shader Model 4.0 (DX10.0)
30 Shader Model 3.0
20 Shader Model 2.x.

#pragma strict
function Start() {
	// Check for shader model 3.0 or better support
	if (SystemInfo.graphicsShaderLevel >= 30)
		print("Woohoo, decent shaders supported!");
}
using UnityEngine;

public class ExampleClass : MonoBehaviour { void Start() { // Check for shader model 3.0 or better support if (SystemInfo.graphicsShaderLevel >= 30) print("Woohoo, decent shaders supported!"); } }