HLSL内置函数表格

【Computeshader】个人总结 Computeshader的部分总结 阅读详情

原文地址:http://www.cppblog.com/lai3d/archive/2008/10/23/64889.html


Intrinsic Functions (DirectX HLSL)

The following table lists the intrinsic functions available in HLSL. Each function has a brief description, and a link to a reference page that has more detail about the input argument and return type.

NameSyntaxDescription
abs abs(x) Absolute value (per component).
acos acos(x) Returns the arccosine of each component of x.
all all(x) Test if all components of x are nonzero.
any any(x) Test if any component of x is nonzero.
asfloat asfloat(x) Convert the input type to a float.
asin asin(x) Returns the arcsine of each component of x.
asint asint(x) Convert the input type to an integer.
asuint asuint(x) Convert the input type to an unsigned integer.
atan atan(x) Returns the arctangent of x.
atan2 atan2(y, x) Returns the arctangent of of two values (x,y).
ceil ceil(x) Returns the smallest integer which is greater than or equal to x.
clamp clamp(x, min, max) Clamps x to the range [min, max].
clip clip(x) Discards the current pixel, if any component of x is less than zero.
cos cos(x) Returns the cosine of x.
cosh cosh(x) Returns the hyperbolic cosine of x.
cross cross(x, y) Returns the cross product of two 3D vectors.
D3DCOLORtoUBYTE4 D3DCOLORtoUBYTE4(x) Swizzles and scales components of the 4D vector x to compensate for the lack of UBYTE4 support in some hardware.
ddx ddx(x) Returns the partial derivative of x with respect to the screen-space x-coordinate.
ddy ddy(x) Returns the partial derivative of x with respect to the screen-space y-coordinate.
degrees degrees(x) Converts x from radians to degrees.
determinant determinant(m) Returns the determinant of the square matrix m.
distance distance(x, y) Returns the distance between two points.
dot dot(x, y) Returns the dot product of two vectors.
exp exp(x) Returns the base-e exponent.
exp2 exp2(x) Base 2 exponent (per component).
faceforward faceforward(n, i, ng) Returns -n * sign(•(i, ng)).
floor floor(x) Returns the greatest integer which is less than or equal to x.
fmod fmod(x, y) Returns the floating point remainder of x/y.
frac frac(x) Returns the fractional part of x.
frexp frexp(x, exp) Returns the mantissa and exponent of x.
fwidth fwidth(x) Returns abs(ddx(x)) + abs(ddy(x))
GetRenderTargetSampleCount GetRenderTargetSampleCount() Returns the number of render-target samples.
GetRenderTargetSamplePosition GetRenderTargetSamplePosition(x) Returns a sample position (x,y) for a given sample index.
isfinite isfinite(x) Returns true if x is finite, false otherwise.
isinf isinf(x) Returns true if x is +INF or -INF, false otherwise.
isnan isnan(x) Returns true if x is NAN or QNAN, false otherwise.
ldexp ldexp(x, exp) Returns x * 2exp
length length(v) Returns the length of the vector v.
lerp lerp(x, y, s) Returns x + s(y - x).
lit lit(n • l, n • h, m) Returns a lighting vector (ambient, diffuse, specular, 1)
log log(x) Returns the base-e logarithm of x.
log10 log10(x) Returns the base-10 logarithm of x.
log2 log2(x) Returns the base-2 logarithm of x.
max max(x, y) Selects the greater of x and y.
min min(x, y) Selects the lesser of x and y.
modf modf(x, out ip) Splits the value x into fractional and integer parts.
mul mul(x, y) Performs matrix multiplication using x and y.
noise noise(x) Generates a random value using the Perlin-noise algorithm.
normalize normalize(x) Returns a normalized vector.
pow pow(x, y) Returns xy.
radians radians(x) Converts x from degrees to radians.
reflect reflect(i, n) Returns a reflection vector.
refract refract(i, n, R) Returns the refraction vector.
round round(x) Rounds x to the nearest integer
rsqrt rsqrt(x) Returns 1 / sqrt(x)
saturate saturate(x) Clamps x to the range [0, 1]
sign sign(x) Computes the sign of x.
sin sin(x) Returns the sine of x
sincos sincos(x, out s, out c) Returns the sine and cosine of x.
sinh sinh(x) Returns the hyperbolic sine of x
smoothstep smoothstep(min, max, x) Returns a smooth Hermite interpolation between 0 and 1.
sqrt sqrt(x) Square root (per component)
step step(a, x) Returns (x >= a) ? 1 : 0
tan tan(x) Returns the tangent of x
tanh tanh(x) Returns the hyperbolic tangent of x
tex1D tex1D(s, t) 1D texture lookup.
tex1Dbias tex1Dbias(s, t) 1D texture lookup with bias.
tex1Dgrad tex1Dgrad(s, t, ddx, ddy) 1D texture lookup with a gradient.
tex1Dlod tex1Dlod(s, t) 1D texture lookup with LOD.
tex1Dproj tex1Dproj(s, t) 1D texture lookup with projective divide.
tex2D tex2D(s, t) 2D texture lookup.
tex2Dbias tex2Dbias(s, t) 2D texture lookup with bias.
tex2Dgrad tex2Dgrad(s, t, ddx, ddy) 2D texture lookup with a gradient.
tex2Dlod tex2Dlod(s, t) 2D texture lookup with LOD.
tex2Dproj tex2Dproj(s, t) 2D texture lookup with projective divide.
tex3D tex3D(s, t) 3D texture lookup.
tex3Dbias tex3Dbias(s, t) 3D texture lookup with bias.
tex3Dgrad tex3Dgrad(s, t, ddx, ddy) 3D texture lookup with a gradient.
tex3Dlod tex3Dlod(s, t) 3D texture lookup with LOD.
tex3Dproj tex3Dproj(s, t) 3D texture lookup with projective divide.
texCUBE texCUBE(s, t) Cube texture lookup.
texCUBEbias texCUBEbias(s, t) Cube texture lookup with bias.
texCUBEgrad texCUBEgrad(s, t, ddx, ddy) Cube texture lookup with a gradient.
texCUBElod tex3Dlod(s, t) Cube texture lookup with LOD.
texCUBEproj texCUBEproj(s, t) Cube texture lookup with projective divide.
transpose transpose(m) Returns the transpose of the matrix m.
trunc trunc(x) Truncates floating-point value(s) to integer value(s)



表 3-1 HLSL内置函数

函数名            用法

abs                         计算输入值的绝对值。

acos                        返回输入值反余弦值。

all                           测试非0值。

any                         测试输入值中的任何非零值。

asin                         返回输入值的反正弦值。

atan                        返回输入值的反正切值。

atan2                       返回y/x的反正切值。

ceil                         返回大于或等于输入值的最小整数。

clamp                      把输入值限制在[min, max]范围内。

clip                         如果输入向量中的任何元素小于0,则丢弃当前像素。

cos                         返回输入值的余弦。

cosh                       返回输入值的双曲余弦。

cross                      返回两个3D向量的叉积。

ddx                         返回关于屏幕坐标x轴的偏导数。

ddy                         返回关于屏幕坐标y轴的偏导数。

degrees                   弧度到角度的转换

determinant              返回输入矩阵的值。

distance                   返回两个输入点间的距离。

dot                          返回两个向量的点积。

exp                         返回以e为底数,输入值为指数的指数函数值。

exp2                       返回以2为底数,输入值为指数的指数函数值。

faceforward             检测多边形是否位于正面。

floor                       返回小于等于x的最大整数。

fmod                       返回a / b的浮点余数。

frac                        返回输入值的小数部分。

frexp                       返回输入值的尾数和指数

fwidth                     返回 abs ( ddx (x) + abs ( ddy(x))。

isfinite                     如果输入值为有限值则返回true,否则返回false。

isinf                        如何输入值为无限的则返回true。

isnan                       如果输入值为NAN或QNAN则返回true。

ldexp                       frexp的逆运算,返回 x * 2 ^ exp。

len / lenth                返回输入向量的长度。

lerp                         对输入值进行插值计算。

lit                            返回光照向量(环境光,漫反射光,镜面高光,1)。

log                          返回以e为底的对数。

log10                      返回以10为底的对数。

log2                        返回以2为底的对数。

max                        返回两个输入值中较大的一个。

min                         返回两个输入值中较小的一个。

modf                       把输入值分解为整数和小数部分。

mul                         返回输入矩阵相乘的积。

normalize                 返回规范化的向量,定义为 x / length(x)。

pow                        返回输入值的指定次幂。

radians                    角度到弧度的转换。

reflect                     返回入射光线i对表面法线n的反射光线。

refract                     返回在入射光线i,表面法线n,折射率为eta下的折射光线v。

round                      返回最接近于输入值的整数。

rsqrt                       返回输入值平方根的倒数。

saturate                   把输入值限制到[0, 1]之间。

sign                        计算输入值的符号。

sin                          计算输入值的正弦值。

sincos                     返回输入值的正弦和余弦值。

sinh                        返回x的双曲正弦。

smoothstep              返回一个在输入值之间平稳变化的插值。

sqrt                         返回输入值的平方根。

step                        返回(x >= a)? 1 : 0。

tan                          返回输入值的正切值。

fanh                        返回输入值的双曲线切线。

transpose                 返回输入矩阵的转置。

tex1D*                    1D纹理查询。

tex2D*                    2D纹理查询。

tex3D*                    3D纹理查询。

texCUBE*                立方纹理查询。

Intrinsic Functions (DirectX HLSL)

The following table lists the intrinsic functions available in HLSL. Each function has a brief description, and a link to a reference page that has more detail about the input argument and return type.

Name Description Minimum shader model
abs Absolute value (per component). 11
acos Returns the arccosine of each component of x. 11
all Test if all components of x are nonzero. 11
AllMemoryBarrier Blocks execution of all threads in a group until all memory accesses have been completed. 5
AllMemoryBarrierWithGroupSync Blocks execution of all threads in a group until all memory accesses have been completed and all threads in the group have reached this call. 5
any Test if any component of x is nonzero. 11
asdouble Reinterprets a cast value into a double. 5
asfloat Convert the input type to a float. 4
asin Returns the arcsine of each component of x. 11
asint Convert the input type to an integer. 4
asuint Reinterprets the bit pattern of a 64-bit type to a uint. 5
asuint Convert the input type to an unsigned integer. 4
atan Returns the arctangent of x. 11
atan2 Returns the arctangent of of two values (x,y). 11
ceil Returns the smallest integer which is greater than or equal to x. 11
clamp Clamps x to the range [min, max]. 11
clip Discards the current pixel, if any component of x is less than zero. 11
cos Returns the cosine of x. 11
cosh Returns the hyperbolic cosine of x. 11
countbits Counts the number of bits (per component) in the input integer. 5
cross Returns the cross product of two 3D vectors. 11
D3DCOLORtoUBYTE4 Swizzles and scales components of the 4D vector xto compensate for the lack of UBYTE4 support in some hardware. 11
ddx Returns the partial derivative of x with respect to the screen-space x-coordinate. 21
ddx_coarse Computes a low precision partial derivative with respect to the screen-space x-coordinate. 5
ddx_fine Computes a high precision partial derivative with respect to the screen-space x-coordinate. 5
ddy Returns the partial derivative of x with respect to the screen-space y-coordinate. 21
ddy_coarse Computes a low precision partial derivative with respect to the screen-space y-coordinate. 5
ddy_fine Computes a high precision partial derivative with respect to the screen-space y-coordinate. 5
degrees Converts x from radians to degrees. 11
determinant Returns the determinant of the square matrix m. 11
DeviceMemoryBarrier Blocks execution of all threads in a group until all device memory accesses have been completed. 5
DeviceMemoryBarrierWithGroupSync Blocks execution of all threads in a group until all device memory accesses have been completed and all threads in the group have reached this call. 5
distance Returns the distance between two points. 11
dot Returns the dot product of two vectors. 1
dst Calculates a distance vector. 5
EvaluateAttributeAtCentroid Evaluates at the pixel centroid. 5
EvaluateAttributeAtSample Evaluates at the indexed sample location. 5
EvaluateAttributeSnapped Evaluates at the pixel centroid with an offset. 5
exp Returns the base-e exponent. 11
exp2 Base 2 exponent (per component). 11
f16tof32 Converts the float16 stored in the low-half of the uint to a float. 5
f32tof16 Converts an input into a float16 type. 5
faceforward Returns -n * sign(dot(i, ng)). 11
firstbithigh Gets the location of the first set bit starting from the highest order bit and working downward, per component. 5
firstbitlow Returns the location of the first set bit starting from the lowest order bit and working upward, per component. 5
floor Returns the greatest integer which is less than or equal to x. 11
fmod Returns the floating point remainder of x/y. 11
frac Returns the fractional part of x. 11
frexp Returns the mantissa and exponent of x. 21
fwidth Returns abs(ddx(x)) + abs(ddy(x)) 21
GetRenderTargetSampleCount Returns the number of render-target samples. 4
GetRenderTargetSamplePosition Returns a sample position (x,y) for a given sample index. 4
GroupMemoryBarrier Blocks execution of all threads in a group until all group shared accesses have been completed. 5
GroupMemoryBarrierWithGroupSync Blocks execution of all threads in a group until all group shared accesses have been completed and all threads in the group have reached this call. 5
InterlockedAdd Performs a guaranteed atomic add of value to the dest resource variable. 5
InterlockedAnd Performs a guaranteed atomic and. 5
InterlockedCompareExchange Atomically compares the input to the comparison value and exchanges the result. 5
InterlockedCompareStore Atomically compares the input to the comparison value. 5
InterlockedExchange Assigns value to dest and returns the original value. 5
InterlockedMax Performs a guaranteed atomic max. 5
InterlockedMin Performs a guaranteed atomic min. 5
InterlockedOr Performs a guaranteed atomic or. 5
InterlockedXor Performs a guaranteed atomic xor. 5
isfinite Returns true if x is finite, false otherwise. 11
isinf Returns true if x is +INF or -INF, false otherwise. 11
isnan Returns true if x is NAN or QNAN, false otherwise. 11
ldexp Returns x * 2exp 11
length Returns the length of the vector v. 11
lerp Returns x + s(y - x). 11
lit Returns a lighting vector (ambient, diffuse, specular, 1) 11
log Returns the base-e logarithm of x. 11
log10 Returns the base-10 logarithm of x. 11
log2 Returns the base-2 logarithm of x. 11
mad Performs an arithmetic multiply/add operation on three values. 5
max Selects the greater of x and y. 11
min Selects the lesser of x and y. 11
modf Splits the value x into fractional and integer parts. 11
mul Performs matrix multiplication using x and y. 1
noise Generates a random value using the Perlin-noise algorithm. 11
normalize Returns a normalized vector. 11
pow Returns xy. 11
Process2DQuadTessFactorsAvg Generates the corrected tessellation factors for a quad patch. 5
Process2DQuadTessFactorsMax Generates the corrected tessellation factors for a quad patch. 5
Process2DQuadTessFactorsMin Generates the corrected tessellation factors for a quad patch. 5
ProcessIsolineTessFactors Generates the rounded tessellation factors for an isoline. 5
ProcessQuadTessFactorsAvg Generates the corrected tessellation factors for a quad patch. 5
ProcessQuadTessFactorsMax Generates the corrected tessellation factors for a quad patch. 5
ProcessQuadTessFactorsMin Generates the corrected tessellation factors for a quad patch. 5
ProcessTriTessFactorsAvg Generates the corrected tessellation factors for a tri patch. 5
ProcessTriTessFactorsMax Generates the corrected tessellation factors for a tri patch. 5
ProcessTriTessFactorsMin Generates the corrected tessellation factors for a tri patch. 5
radians Converts x from degrees to radians. 1
rcp Calculates a fast, approximate, per-component reciprocal. 5
reflect Returns a reflection vector. 1
refract Returns the refraction vector. 11
reversebits Reverses the order of the bits, per component. 5
round Rounds x to the nearest integer 11
rsqrt Returns 1 / sqrt(x) 11
saturate Clamps x to the range [0, 1] 1
sign Computes the sign of x. 11
sin Returns the sine of x 11
sincos Returns the sine and cosine of x. 11
sinh Returns the hyperbolic sine of x 11
smoothstep Returns a smooth Hermite interpolation between 0 and 1. 11
sqrt Square root (per component) 11
step Returns (x >= a) ? 1 : 0 11
tan Returns the tangent of x 11
tanh Returns the hyperbolic tangent of x 11
tex1D(s, t) 1D texture lookup. 1
tex1D(s, t, ddx, ddy) 1D texture lookup. 21
tex1Dbias 1D texture lookup with bias. 21
tex1Dgrad 1D texture lookup with a gradient. 21
tex1Dlod 1D texture lookup with LOD. 31
tex1Dproj 1D texture lookup with projective divide. 21
tex2D(s, t) 2D texture lookup. 11
tex2D(s, t, ddx, ddy) 2D texture lookup. 21
tex2Dbias 2D texture lookup with bias. 21
tex2Dgrad 2D texture lookup with a gradient. 21
tex2Dlod 2D texture lookup with LOD. 3
tex2Dproj 2D texture lookup with projective divide. 21
tex3D(s, t) 3D texture lookup. 11
tex3D(s, t, ddx, ddy) 3D texture lookup. 21
tex3Dbias 3D texture lookup with bias. 21
tex3Dgrad 3D texture lookup with a gradient. 21
tex3Dlod 3D texture lookup with LOD. 31
tex3Dproj 3D texture lookup with projective divide. 21
texCUBE(s, t) Cube texture lookup. 11
texCUBE(s, t, ddx, ddy) Cube texture lookup. 21
texCUBEbias Cube texture lookup with bias. 21
texCUBEgrad Cube texture lookup with a gradient. 21
texCUBElod Cube texture lookup with LOD. 31
texCUBEproj Cube texture lookup with projective divide. 21
transpose Returns the transpose of the matrix m. 1
trunc Truncates floating-point value(s) to integer value(s)
Lerp函数-详解 Lerp函数通常接收三个参数:起始值a,结束值b,以及插值因子t。语法为 lerp(a, b, t) ,其中 a 是起始值, b 是结束值, t 是插值因子,取值范围通常在 0 到 1 之间。在一维空间中,已知两个数值 a 和 b ,以及介于0到1之间的系数 ,线性插值公式为:lerp(a, b, t) = a + (b - a) * t。基于线性插值公式 lerp(a, b, t)=a + (b - a) * t , a 和 b 是起始与结束值, t 为0到1的插值因子。 阅读详情

相关推荐

UnityShader获得物体顶点到摄像机距离

UnityShader获取相机到物体的距离

YanisWu的博客 978

HLSL固有函数

Intrinsic Functions (DirectX HLSL) The following table lists the intrinsic functions available in HLSL. Each function has a brief description, and a link to a reference page that has more detail abou

熊小屁的专栏 1628

从DXR到Vulkan:用HLSL开发光线追踪的跨API迁移手册(附NVIDIA工具链配置)

本文详细介绍了如何将基于DXR和HLSL的光线追踪项目迁移至Vulkan平台。通过利用NVIDIA工具链和DXC编译器,开发者可将HLSL着色器编译为SPIR-V,并复用大部分现有代码。文章重点解析了Vulkan光线追踪管线与DXR的架构差异、着色器绑定表构建、TraceRay指令映射等核心难点,并提供了实战配置方案与性能优化建议。

weixin_29268385的博客 137

HLSL 常用函数

如果函数 ddx 的参数为 myVar,该参数对应的像素点记为p(i,j),则 ddx(myVar)的值为“像素点 p(i+1,j)的值减去myVar”(ddy同理)tex3Dproj(s, t) 把纹理当做一张幻灯片投影到场景中,先使用投影纹理技术需要计算出投影纹理坐标t(坐标t.w除以透视值),然后使用投影纹理坐标进行查询。ex1Dproj(s, t) 把纹理当做一张幻灯片投影到场景中,先使用投影纹理技术需要计算出投影纹理坐标t(坐标t.w除以透视值),然后使用投影纹理坐标进行查询。

萧戈的专栏 1275

UE5材质编程实战:用HLSL手搓像素化、模糊和噪点特效(附完整代码)

本文详细介绍了在UE5中使用HLSL实现像素化、模糊和噪点特效的实战指南。通过完整的代码示例和工程化配置,帮助开发者快速掌握材质编程技巧,解决常见的编译错误和性能优化问题,适用于游戏开发和视觉特效制作。

weixin_30564901的博客 291

UE5.5 PCG框架避坑指南:GPU节点HLSL开发中的7个常见错误

本文深入解析UE5.5 PCG框架中GPU节点HLSL开发的7个常见错误,包括AttributeId映射、线程同步、Bounds计算精度等关键问题。提供可直接应用的解决方案代码,帮助开发者避免性能损失和数据错误,提升PCG框架下的GPU编程效率。

weixin_29007809的博客 195

高级着色语言HLSL入门(6)

高级着色语言HLSL入门(6)16.7内建函数<br />HLSL有一个丰富的内建函数的集合,它们对3D图形来说非常有用。下表是一个删减了的列表,注意:要得到更多的参考,可以参看DirectX文档中内建HLSL函数的完整列表。<br />以下表格中,//<variable>//表示变量variable的模(例如向量的绝对值)。<br />函数<br />描述<br />abs(x)<br />返回 |x|<br />ceil(x)<br />返回 ≥ x 的最小整数<br />clamp(x, a, b)<

优秀技术文章收录 1964

Unity ASE可视化Shader开发:HLSL直出与SRP兼容实践

Shader开发是实时渲染管线中的核心环节,涉及光照模型、UV变换、Alpha混合等底层图形学概念。其原理基于HLSL/Cg着色语言,在GPU上执行顶点与片元计算,技术价值在于兼顾性能可控性与视觉表现力。典型应用场景包括动态溶解、边缘光增强、自定义Tessellation等需精细调控的特效实现。随着URP/HDRP成为Unity主流渲染管线,开发者亟需支持SRP兼容、可调试、可复用的Shader工具。ASE(Amplify Shader Editor)正是一种将HLSL抽象语法树(AST)可视化的编译器级工

weixin_32306957的博客 557

HLSL 函数 备用

在网上看到有人贴的,自己该了改,有的翻译按自己的习惯写的,(其实原来的帖子没什么问题,已经非常好了)就是做成表格的好看些。留作备忘abs(x)绝对值 (每组件).Absolute value (per component).acos(x)返回x每个组件的acos值.Returns the arccosine of each component o

circle79 的专栏 690

UE5材质节点实现自定义高斯模糊(纯HLSL方案)

高斯模糊是图像处理中基于正态分布的平滑滤波技术,其核心原理是通过加权邻域像素进行离散卷积运算。在实时渲染中,它广泛应用于景深、UI虚化、后处理等场景,但需兼顾数学准确性与GPU执行效率。UE5材质系统因缺乏原生高斯模糊节点,常导致采样坐标系误用、权重归一化失效及纹理访存不连续等问题。本文聚焦于在标准材质图中嵌入可控HLSL代码,结合TextureSize感知、VectorParameter权重预计算与分步像素偏移等关键技术,实现跨平台、低开销、可调试的纯节点高斯模糊方案,适用于UI虚化、动态焦点控制等工程需

weixin_29876033的博客 628

Unity URP着色器迁移实战:从Built-In到URP的完整指南

在实时图形渲染中,着色器(Shader)是实现材质表现的核心技术组件,它定义了物体表面如何与光线交互。其原理是通过编写GPU程序来控制顶点变换、像素着色等渲染管线阶段。随着渲染架构演进,Unity推出了通用渲染管线(URP),它基于可编程渲染管线(SRP)框架,提供了更现代、高效的渲染方案。URP的技术价值在于更好的性能优化(如SRP Batcher)、跨平台一致性以及更可控的渲染流程。在游戏开发、工业可视化等应用场景中,将项目从旧版Built-In管线升级到URP已成为提升画面质量和性能的关键步骤。然而,

culi3182的博客 530

Shader入门精要表格速查

整理一下UnityShader入门精要中出现的表格,供以后速查。 提醒一下,所有表格均设置了目录索引,优快云网页打开,在文章的左侧或者右侧会有目录,可以快速索引。

酒馆笔记 247

UE材质节点中高效实现动态高斯模糊的实战解析

本文深入解析了在UE材质节点中实现动态高斯模糊的实战技巧。针对后处理模糊无法满足局部、动态、定制化需求的痛点,文章详细介绍了利用Custom节点编写HLSL代码的核心思路,重点攻克了动态Mip等级计算以消除瑕疵,并对比了动态模糊与直接采样低Mip的性能与质量差异,为开发者提供了高效、可控的渲染解决方案。

weixin_29008055的博客 310

Using Vulkan -- Vulkan High Level Shader Language Comparison

本文对比了Vulkan中GLSL与HLSL两种着色器语言的核心差异。主要内容包括:数据类型表示差异(GLSL显式向量/矩阵类型与HLSL基础类型)、接口绑定方式(GLSL的layout语法与HLSL的寄存器语法)、内置变量与语义的对应关系(如gl_Position↔SV_POSITION)、特殊功能实现(推送常量、子组操作等)以及常用函数映射。重点指出矩阵存储顺序、着色器阶段标识等关键区别,为开发者提供跨语言迁移的快速参考。文档强调这些映射并非完全一一对应,建议作为移植起点而非完整指南。

dengfuma的专栏 481

Google Earth Engine——如何利用HLSL30(3 天时间分辨率/ 30 米的空间分辨率)影像实现逐月影像的下载(geetool batch)

在Google Earth Engine (GEE) 中,可以使用HLS L30影像集来获取逐月影像。以下是通过GEE用户界面实现此操作的步骤:1. 打开 https://code.earthengine.google.com/,登录您的GEE帐户。2. 在GEE界面的左上方,点击"Assets"按钮,并选择"Create" > "Folder"。创建一个新的文件夹,用于保存L30影像。3. 在左上方的搜索栏中,输入"hls"来找到HLS影像集。选择"HLS.L30"。

此星光明博客 765

消费级显卡跑大模型:RTX 3060 12G 部署 70 亿参数 AI 编程助手的优化实战

本文详细介绍了如何在消费级显卡RTX 3060 12G上,通过量化、投机解码和分页KV-Cache等核心优化技术,成功部署并流畅运行70亿参数的CodeLlama-7B编程助手。文章提供了从环境配置、模型准备到参数调优的完整实战笔记,实测显存占用降至7.3GB,生成速度达21.7 token/秒,为开发者和技术爱好者提供了可行的本地AI部署方案。

weixin_29053067的博客 1252

[Render] 适用于高级Unity创作者的通用渲染管线[5] - 阴影

升级到 URP 时,自定义着色器需要做一些工作。下面列出了在升级过程中对旧版着色器执行的操作。视频我们制作了这个分步视频教程,介绍如何将自定义无光照内置着色器转换为 URP,包括要遵循的 Unity 项目。

unity尧明的博客 577

linux下autocad完美替代品bricscad的安装运行

前言 在Linux平台下,能完美兼容.dwg文件的软件并不多。 虽然国产的中望和浩辰为适配uos操作系统,近期都推出了linux版本,但目前好像还没有对应的破姐流出。(如果有的话请私信我或留下评论) 然而有了这一款源自比利时的软件——bricscad,linux下查看和编辑.dwg文件再也不是噩梦了! 安装pj 资源链接:https://pan.baidu.com/s/1dC7zarlqwuO5fa4CBL_KGQ 提取码:24j6 1.下载对应的压缩包,解压并安装其中对应的deb或rpm软件包。 2.在C

weixin_35259117的博客 4478

效果框架(效果ID3DXEffect)

将一个着色器与某一个特定路径建立关联。

寂蝶难双,窃窃思羽. 874

5种主流触觉传感器对比:GelSight、DIGIT、Taxim、GelSlim和TACTO怎么选?

本文深度对比了GelSight、DIGIT、Taxim、GelSlim和TACTO五种主流触觉传感器的技术原理与应用场景。针对机器人及VR项目的选型需求,文章从光学与电子传感的技术分野出发,分析了各传感器在分辨率、响应速度、集成难度和成本上的核心差异,并提供了从需求出发的实战选型决策框架,帮助开发者找到最适合的触觉解决方案。

weixin_29268637的博客 693

C#操作MySQL从入门到精通(3)——新建数据库、新建表

我们要首先新建一个数据库,并且在数据库中新建一系列的表来管理数据库。

qq_34059233的博客 949

着色器和效果——1.7 内建函数

1.7 内建函数阅读此文表明您已同意文末的声明HLSL有一个丰富的内建函数的集合,它们对3D图形来说非常有用。下表是一个删减了的列表。在下两章中,我们会使用这些函数中的一些进行实践。而现在,熟悉它们就够了。注意:要得到更多的参考,可以参看DirectX文档中内建HLSL函数的完整列表,在Content页下,然后到DirectX Graphics/Reference/Shader Ref

RaymondKing的专栏 4579

倍福PLC--PERSISTENT断电保持数据和BOOT中各文件对应的解析

将D:\TC3程序\TwinCAT Project146\TwinCAT RT(x86)\Plc 文件夹的中三个替换文件复制到:G:\TwinCAT\3.1\Boot\Plc完成替换,如下图。(2) 找到程序所存的路径,编程电脑的D:\TC3程序\TwinCAT Project146路径下,并选择对应系统平台TwinCAT RT(x86)(3) 控制器断电,拔出内存卡,使用读卡器,在编程电脑中打开:(本次测试读卡器为G盘)(5) 开机完成后,TwinCAT自动运行,当前闪灯频率为50ms。

weixin_41883890的博客 2339
上一篇: 深入浅出聊优化:从Draw Calls到GC
下一篇: 使用Xcode GPU Frame Caputre教程
puppet_master
puppet_master 领域专家: C/C++技术领域 领域专家: C/C++技术领域
博客等级 码龄12年 2695粉丝 161原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值