Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Data Types

HLSL supports many different intrinsic data types. This table shows which types to use to define shader variables.

Use This Intrinsic TypeTo Define This Shader Variable
Buffer Buffer, which contains one or more scalars
Scalar One-component scalar
Vector, Matrix Multiple-component vector or matrix
Sampler, Shader, Texture Sampler, shader, or texture object
Struct, User Defined Custom structure or typedef

 

To help you better understand how to use vectors and matrices in HLSL, you may want to read this background information on how HLSL uses per-component math.

Related topics

Variables (DirectX HLSL)

 

 

Community Additions

ADD
Show:
© 2015 Microsoft