HLSL pragma require command reference
Reference for all the valid values for the pragma require directive.
Read time 2 minutesLast updated 7 days ago
Here are all the valid values for the directive.
#pragma requireValue | Description |
|---|---|
| At least 10 vertex-to-fragment interpolators (“varyings”) are available. |
| At least 15 vertex-to-fragment interpolators (“varyings”) are available. Note: Internally, this also automatically adds |
| At least 32 vertex-to-fragment interpolators (“varyings”) are available. |
| Integers are a supported data type, including bit/shift operations. Note: Internally, this also automatically adds |
| At least 4 render targets are supported. |
| At least 8 render targets are supported. |
| Pixel shader derivative instructions (ddx/ddy) are supported. |
| Explicit texture LOD sampling (tex2Dlod / SampleLevel) is supported. |
| Pixel location (XY on screen, ZW depth in clip space) input in pixel shader is supported. |
| 2D texture arrays are a supported data type. |
| Cubemap arrays are a supported data type. |
| SV_InstanceID input system value is supported. |
| Geometry shader stages are supported. |
| Compute shaders, structured buffers, and atomic operations are supported. |
| “Random write” (UAV) textures are supported. |
| Hardware tessellation is supported, but not necessarily tessellation (hull/domain) shader stages. For example, Metal supports tessellation, but not hull or domain stages. |
| Tessellation (hull/domain) shader stages are supported. |
| The ability to access multi-sampled textures (Texture2DMS in HLSL) is supported. |
| Sparse textures with residency info (“Tier2” support in DirectX terms; |
| The ability to get the current framebuffer from GPU memory is supported. This process is sometimes called framebuffer fetch. For more information, refer to Writing shaders for different graphics APIs. |
| Setting the render target array index from any shader stage (not just the geometry shader stage) is supported. |
| Inline ray tracing is supported, so you can generate ray queries in the rasterization and compute stages of a shader. Refer to SystemInfo.supportsInlineRayTracing for more information. |