Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 2.06 KB

dx-graphics-hlsl-data-types.md

File metadata and controls

47 lines (30 loc) · 2.06 KB
title description ms.assetid ms.topic ms.date topic_type api_name api_type api_location
Data Types (HLSL)
HLSL supports many different intrinsic data types. This table shows which types to use to define shader variables.
e4b7738d-e865-4151-a204-0a5b88a913b3
article
05/31/2018
kbArticle

Data Types (HLSL)

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

Use this intrinsic type To define this shader variable
Scalar One-component scalar
Vector, Matrix Multiple-component vector or matrix
Sampler, Texture or Buffer Sampler, texture, or buffer object
Struct, User Defined Custom structure or typedef
Array Literal scalar expressions declared containing most other types
State Object HLSL representations of state objects

 

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)