The complete effect and HLSL Guide (3)
The copyright of this article is owned by the original author and is only for personal use. Do not repost it. Do not use it for any commercial purposes.
Due to my limited level, errors are inevitable. If you are not clear about it, please refer to the original document. You are welcome to talk with me a lot.
Translation: Clayman
Blog: http://blog.csdn.net/soilwork
Clayman_joe@yahoo.com.cn
The keyword true indicates the true constant in the boolean type. For details, see section 2 about data types. The keyword typedef is used to define a new data type. For details, see section 2 about data types. The uniform variable is used to define the variable as uniform, which means that the initial value of this variable will not change during all the coloring ers. For details, see section 2 about data types. The keyword vector is used to represent a vector type of data. For details, see section 2 about data types. The vertexfragment keyword is used to define a vertex segment (or shader ). The keyword void indicates a void (or empty) data type. For details, see section 2 about data types. The volatile keyword indicates that a variable in the compiler will change frequently. For details, see section 2 about data types. The while keyword is used to define the condition do-while loop. The table above may seem boring, especially for beginners of HLSL, and may even be confused. Don't worry. This book is both a Learning Guide and a reference book. The information in Table 1-1 is used as a reference. When we learn HLSL syntax and sample programs, you will know how to use them. In this chapter, I will point out all major syntax and grammar elements in HLSL. In the subsequent sections, we will go deeper. In addition to the keywords in Table 1-1, there are also a series of reserved keywords that are not currently used by HLSL. These keywords are reserved for future language extensions. These reserved keywords are listed in Table 1-2:
Table
1-2 HLSL
Reserved keywordsAuto break case catchdefault Delete dynamic_case enumexplicit end goto longmutable namespace new operatorprivate protected public reinterpret_caseshort signed sizeof static_castswitch template this throwtry typename ununion signedusing virtual