在网上看到有人贴的,自己该了改,有的翻译按自己的习惯写的,(其实原来的帖子没什么问题,已经非常好了)就是做成表格的好看些。留作备忘
abs(x) 绝对值 (每组件). Absolute value (per component). acos(x) 返回x每个组件的acos值. Returns the arccosine of each component of x. all(x) 测试x的所有组件是否都是非零. Test if all components of x are nonzero. any(x) 测试x的任一组件是否是非零. Test if any component of x is nonzero. asfloat(x) 将输入值转换为一个浮点值. Convert the input type to a float. asin(x) 返回x每个组件的asin值. the arcsine of each component of x. asint(x) 将输入值转换为一个整形值. Convert the input type to an integer. asuint(x) 将输入值转换为一个无符号整形值. Convert the input type to an unsigned integer. atan(x) 返回x的atan值. Returns the arctangent of x. atan2(y, x) 返回x,y这两个值的atan值. Returns the arctangent of of two values (x,y). ceil(x) 返回大于等于x的最小整数 Returns the smallest integer which is greater than or equal to x. clamp(x, min, max) 把输入值限制在[min, max]范围内。 Clamps x to the range [min, max]. clip(x) 如果输入向量中的任何元素小于0,则丢弃当前像素 Discards the current pixel, if any component of x is less than zero. cos(x) 返回输入值的余弦 Returns the cosine of x. cosh(x) 返回输入值的双曲余弦 Returns the hyperbolic cosine of x. cross(x, y) 返回两个3D向量的叉积 Returns the cross product of two 3D vectors. D3DCOLORtoUBYTE4(x) 混合和缩放4D向量x用于补偿一些对UBYTE4支持的硬件 Swizzles and scales components of the 4D vector x to compensate for the lack of UBYTE4 support in some hardware. ddx(x) 返回关于屏幕坐标x轴的偏导数 Returns the partial derivative of x with respect to the screen-space x-coordinate. ddy(x) 返回关于屏幕坐标y轴的偏导数 Returns the partial derivative of x with respect to the screen-space y-coordinate. degrees(x) 弧度到角度的转换 Converts x from radians to degrees. determinant(m) 返回输入矩阵的值 Returns the determinant of the square matrix m. distance(x, y) 返回两点间的距离 Returns the distance between two points. dot(x, y) 返回两个向量的点积 Returns the dot product of two vectors. exp(x) 返回以e为底数,输入值为指数的指数函数值 Returns the base-e exponent. exp2(x) 返回以2为底数,输入值为指数的指数函数值 Base 2 exponent (per component). faceforward(n, i, ng) 检测多边形是否位于正面 Returns -n * sign(●(i, ng)). floor(x) 返回小于等于x的最大整数 Returns the greatest integer which is less than or equal to x. fmod(x, y) 返回x / y的浮点余数 Returns the floating point remainder of x/y. frac(x) 返回输入值的小数部分 Returns the fractional part of x. frexp(x, exp) 返回输入值的尾数和指数 Returns the mantissa and exponent of x. fwidth(x) 返回 abs ( ddx (x) + abs ( ddy(x))。 Returns abs(ddx(x)) + abs(ddy(x)) GetRenderTargetSampleCount() 返回RT的个数 Returns the number of render-target samples. GetRenderTargetSamplePosition(x) 返回关于给定采样索引的一个采样点(x,y) Returns a sample position (x,y) for a given sample index. isfinite(x) 如果输入值为有限值则返回true,否则返回false Returns true if x is finite, false otherwise. isinf(x) 如何输入值为无限的则返回true Returns true if x is +INF or -INF, false otherwise. isnan(x) 如果输入值为NAN或QNAN则返回true Returns true if x is NAN or QNAN, false otherwise. ldexp(x, exp) frexp的逆运算,返回 x * 2 ^ exp Returns x * 2exp length(v) 返回输入向量的长度(length/len) Returns the length of the vector v. lerp(x, y, s) 对输入值进行插值计算 Returns x + s(y - x). lit(n ● l, n ● h, m) 返回光照向量(环境光,漫反射光,镜面高光,1)。 Returns a lighting vector (ambient, diffuse, specular, 1) log(x) 返回以e为底的对数 Returns the base-e logarithm of x. log10(x) 返回以10为底的对数 Returns the base-10 logarithm of x. log2(x) 返回以2为底的对数 Returns the base-2 logarithm of x. max(x, y) 返回两个输入值中较大的一个 Selects the greater of x and y. min(x, y) 返回两个输入值中较小的一个 Selects the lesser of x and y. modf(x, out ip) 把输入值分解为整数和小数部分 Splits the value x into fractional and integer parts. mul(x, y) 返回输入矩阵相乘的积 Performs matrix multiplication using x and y. noise(x) 使用柏林噪声算法生成一个随机值 Generates a random value using the Perlin-noise algorithm. normalize(x) 返回规范化的向量,定义为 x / length(x)。 Returns a normalized vector. pow(x, y) 返回输入值x的指定y次幂 Returns xy. radians(x) 角度到弧度的转换 Converts x from degrees to radians. reflect(i, n) 返回入射光线i对表面法线n的反射光线 Returns a reflection vector. refract(i, n, R) 返回在入射光线i,表面法线n,折射率为eta下的折射光线v Returns the refraction vector. round(x) 返回最接近于输入值的整数 Rounds x to the nearest integer rsqrt(x) 返回输入值平方根的倒数 Returns 1 / sqrt(x) saturate(x) 把输入值限制到[0, 1]之间 Clamps x to the range [0, 1] sign(x) 计算输入值的符号 Computes the sign of x. sin(x) 计算输入值的正弦值 Returns the sine of x sincos(x, out s, out c) 返回输入值的正弦和余弦值 Returns the sine and cosine of x. sinh(x) 返回x的双曲正弦 Returns the hyperbolic sine of x smoothstep(min, max, x) 返回一个在输入值之间平稳变化的插值 Returns a smooth Hermite interpolation between 0 and 1. sqrt(x) 返回输入值的平方根 Square root (per component) step(a, x) 返回(x >= a)? 1 : 0 Returns (x >= a) ● 1 : 0 tan(x) 返回输入值的正切值 Returns the tangent of x tanh(x) 返回输入值的双曲线切 Returns the hyperbolic tangent of x tex1D(s, t) 1D纹理寻址 1D texture lookup. tex1Dbias(s, t) 1D纹理寻址(支持bias) 1D texture lookup with bias. tex1Dgrad(s, t, ddx, ddy) 1D纹理偏移寻址 1D texture lookup with a gradient. tex1Dlod(s, t) 1D纹理寻址(支持LOD) 1D texture lookup with LOD. tex1Dproj(s, t) 1D纹理寻址(使用透视分离) 1D texture lookup with projective divide. tex2D(s, t) 2D 2D纹理寻址 2D texture lookup. tex2Dbias(s, t) 2D纹理寻址(支持bias) 2D texture lookup with bias. tex2Dgrad(s, t, ddx, ddy) 2D纹理偏移寻址 2D texture lookup with a gradient. tex2Dlod(s, t)2D 2D纹理寻址(支持LOD) 2D Texture lookup with LOD. tex2Dproj(s, t)2D 2D纹理寻址(使用透视分离) 2D texture lookup with projective divide. tex3D(s, t)3D 3D纹理寻址 3D texture lookup. tex3Dbias(s, t) 3D纹理寻址(支持bias) 3D texture lookup with bias. tex3Dgrad(s, t, ddx, ddy) 3D纹理偏移寻址 3D texture lookup with a gradient. tex3Dlod(s, t) 3D纹理寻址(支持LOD) 3D texture lookup with LOD. tex3Dproj(s, t) 3D纹理寻址(使用透视分离) 3D texture lookup with projective divide. texCUBE(s, t) 立方体纹理寻址 Cube texture lookup. texCUBEbias(s, t) 立方体纹理寻址(支持bias) Cube texture lookup with bias. texCUBEgrad(s, t, ddx, ddy) 立方体纹理偏移寻址 Cube texture lookup with a gradient. tex3Dlod(s, t) 立方体纹理偏移寻址(支持LOD) Cube texture lookup with LOD. texCUBEproj(s, t) 立方体纹理寻址(使用透视分离) Cube texture lookup with projective divide. transpose(m) 返回输入矩阵的转置 Returns the transpose of the matrix m. trunc(x) 截取浮点值到整数值 Truncates floating-point value(s) to integer value(s)