ShaderLoader.GetPixelShaderProfile Method

Language:

Returns the name of the high-level shader language (HLSL) profile that is best suited to a given device.

Definition

Visual Basic Public Shared Function GetPixelShaderProfile( _
    ByVal device As Device _
) As String
C# public static string GetPixelShaderProfile(
    Device device
);
C++ public:
static StringGetPixelShaderProfile(
    Devicedevice
);
JScript public static function GetPixelShaderProfile(
    device : Device
) : String;

Parameters

device Microsoft.DirectX.Direct3D.Device
Reference to the Device.

Return Value

System.String
String that contains the HLSL profile name.

Remarks

A shader profile specifies the assembly shader version to use and the capabilities available to the HLSL compiler when compiling a shader. The following table lists the supported pixel shader profiles.

Shader Profile Description
ps_1_1 Compile to ps_1_1 version.
ps_1_2 Compile to ps_1_2 version.
ps_1_3 Compile to ps_1_3 version.
ps_1_4 Compile to ps_1_4 version.
ps_2_0 Compile to ps_2_0 version.
ps_2_a Same as the ps_2_0 profile, with the following additional capabilities available for the compiler to target:
  • Number of temporary registers (r#) is greater than or equal to 28.
  • Arbitrary source swizzle.
  • Gradient instructions: dsx, dsy.
  • Predication.
  • No dependent texture read limit.
  • No limit for the number of texture instructions.
ps_2_sw Compile to ps_2_sw version.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center