Templates

    • value types from HLSL (float, int, float2, float3, float4)
    • 2D textures
    • semantics (used to replace semantics on variables)
    • link types (used to replace link annotations)An instantiated shader behaves the same way as any other shader. The value, texture and sampler template parameters are accessible like any other variable. However, it's impossible to modify their value; attempting to do so results in a compilation error. If a template variable is incorrectly used (eg using a sampler as a semantic), it should result in a compilation error. However, the behavior is officially unknown.

    Code: Templating