Graphics: HLSL

HLSLShaderFactory is a system that allows you to compile and reflect HLSL programs. The classes listed here store information about objects that occur in the shader. The ProgramDefines object is used by applications to specify conditional defines that occur in the HLSL programs, thus allowing you to control how the shader is compiled. The default example is the use of GTE_USE_MAT_VEC for the matrix-vector convention. If you define this in the CPU code, you can have conditional blocks in the HLSL program based on whether this is defined or GET_USE_VEC_MAT is defined.
For now we have only a small number of user-written HLSL functions that are convenient. FloatFunction.hlsli implements frexp and ldexp for 32-bit floating-point numbers in HLSL programs. As of Direct3D 11.1, Microsoft provides intrinsics for these functions but they should not be used because they do not conform to IEEE 754-2008 standards (and in fact produce wrong results for many numbers). See the MSDN online documentation for these HLSL intrinsic functions, Community Additions. The SqrtEstimate can be used for sqrt approximation in HLSL for 64-bit floating-point numbers; HLSL does not have functions for sqrt of such numbers.