DarkBASIC Professional Help File

DX11 CREATE SHADER TECHNIQUE

Creates a new shader technique that uses the given vertex layout, vertex, pixel and (optionally) geometry, hull and domain shaders.
The vertex layout must correspond to the input struct used by the vertex shader.
Default rasterizer, sampler and blend states are set but you can set your own using the
DX11 SET SHADER TECHNIQUE RASTERIZER STATE, DX11 SET SHADER TECHNIQUE SAMPLER STATE and
DX11 SET SHADER TECHNIQUE BLEND STATE functions.
Note that while geometry shaders are available in both DX10 and DX11 mode, hull and domain shaders can only be used in the DX11 mode.

Syntax

    Return Dword shadertechnique = DX11 CREATE SHADER TECHNIQUE(vertLayout, vertexShader, pixelShader, [geometryShader], [hullShader], [domainShader])

Parameters

    vertLayout

> Dword
> The vertex layout that corresponds to the input vertex format expected by the vertex shader.

    vertexShader

> Dword
> The vertex shader used by this shader technique.

    pixelShader

> Dword
> The pixel shader used by this shader technique.

    [Optional] geometryShader

> Dword
> The geometry shader used by this shader technique. Omit for none.

    [Optional] hullShader

> Dword
> The hull shader used by this shader technique. Omit for none. Note that if you specify a hull shader you must also provide a domain shader since they work in concert.

    [Optional] domainShader

> Dword
> The domain shader used by this shader technique. Omit for none. Note that if you specify a domain shader you must also provide a hull shader since they work in concert.

Returns

The created shader technique.

See also

SHADERTECHNIQUE Functions Menu
DX11 Function Categories