Reference for HLSL(HLSL参考)

1649 篇文章 11 订阅
1623 篇文章 22 订阅

The HLSL reference documentation specifies the language characteristics. It is broken into several sections.

  • Language Syntax (DirectX HLSL) - Programming shaders in HLSL requires that you understand the language syntax, that is, how you write HLSL code. This includes code to declare and initialize variables, write user-defined shader functions, and add flow control statements to make your functions more powerful.
  • Shader Models vs Shader Profiles - The HLSL compiler implements rules and restrictions based on shader models. The code in each vertex shader, geometry shader (if you are using Direct3D 10) and pixel shader are validated against a shader model, which you supply at compile time.
  • Intrinsic Functions (DirectX HLSL) - HLSL has many intrinsic functions. These are implemented and tested so that you can use them knowing that they are already debugged and they perform well. If you choose to write your own functions, see the language syntax section for writing user-defined functions.
  • Asm Shader Reference - Assembly instructions that you can use to program and debug shaders.
  • D3DCompiler Reference - Compiles raw HLSL source.
  • Inline Format Conversion Reference - The D3DX_DXGIFormatConvert.inl file contains inline format conversion functions that you can use in the compute shader or pixel shader on Direct3D 11 hardware. You can use these functions in your application to simultaneously both read from and write to a texture. That is, you can perform in-place image editing. To use these inline format conversion functions, include the D3DX_DXGIFormatConvert.inl file in your application.
  • Appendix (DirectX HLSL) - The appendix is included for completeness. It includes a listing of the keywords and reserved words; these words cannot be used as identifiers in your programs. It also includes a listing of the language grammar for reference.
  • HLSL errors and warnings - Provides error and warning codes that a shader can return.

Related topics

Programming Guide for HLSL
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值