EffectCompiler.CompileShader Method

Language:

Compiles a shader from an effect that contains one or more functions.

Overload List

public GraphicsStream CompileShader(EffectHandle, string, ShaderFlags);
public GraphicsStream CompileShader(EffectHandle, string, ShaderFlags, out ConstantTable);
public GraphicsStream CompileShader(EffectHandle, string, ShaderFlags, out string);
public GraphicsStream CompileShader(EffectHandle, string, ShaderFlags, out string, out ConstantTable);

Remarks

Targets for vertex shaders, pixel shaders, and texture fill functions can be specified in the target parameter. The following table lists the shader versions for each type.

Target typeShader version
Vertex shadervs_1_1, vs_2_0, vs_2_sw, vs_3_0
Pixel shaderps_1_1, ps_1_2, ps_1_3, ps_1_4, ps_2_0, ps_2_sw, ps_3_0
Texture filltx_0, tx_1

This method compiles a shader from a function that is written in a C-like language.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.


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