Sdílet prostřednictvím


HLSL Input Semantics (Xbox 360)

This article describes the high-level shader language (HLSL) input semantics available when developing games for Xbox 360.

Vertex Shader Input Semantics

One special vertex shader input semantic is available in HLSL for the Xbox 360: INDEX. Any kind of shader can use the INDEX input semantic. It enables vertex fetching.

For more details, see Vertex Fetching in HLSL.

Pixel Shader Input Semantics

To support point sprites, a specific pixel shader input semantic is available in HLSL: SPRITETEXCOORD. This semantic is required to read the sprite texture coordinates in a point sprite pixel shader.

The following HLSL code demonstrates a pixel shader that can be used with SPRITETEXCOORD to render point sprites.

      sampler2D s;
      float4 main( float2 t : SPRITETEXCOORD ) : COLOR
      {
        return tex2D( s, t );
      }
    

See Also

Tasks

How to: Draw Point Sprites

Concepts

Xbox 360 Programming Considerations
HLSL Attributes (Xbox 360)
Microcode (xvs_3_0, xps_3_0)