dxCreatePixelShader%(operation$,file$,entry_point$,version$)

Parameters

operation$ = string containing a HLSL or empty string if using a HLSL file
file$ = file of HLSL script to compile
entry_point$ = name of the function within the HLSL script to run on execution. Attention this is a CASE SENITIVE parameter, letter for letter. Type it wrong and the script will not compile.
version$ = verison of the HLSL script, can be one of the following...

ps_1_1 Compile to pixel shader version 1.1
ps_1_2 Compile to pixel shader version 1.2
ps_1_3 Compile to pixel shader version 1.3
ps_1_4 Compile to pixel shader version 1.4
ps_2_0 Compile to pixel shader version 2.0
ps_2_a Compile to pixel shader version 2.0a
ps_2_b Compile to pixel shader version 2.0b
ps_3_0 Compile to pixel shader version 3.0

Choose the correct pixel shader for the HLSL script in question. If in doubt use the latest ps_3_0, which has the greater amount of capabilities.


Description

Creates a pixel shader from a HLSL script and return it's handle. If you supply a string to operation$, the string will be compiled. Otherwise, the script contained in the file given in file$ will be compiled.

If the HLSL script is not found or it could not be compiled for any reason, the result of this function will be 0. In case of a compiler error, the error can be retrieved with the function dxGetLastShaderError$()