gpt4 book ai didi

opengl - texelFetchOffset 的 CG 等价物

转载 作者:行者123 更新时间:2023-12-03 12:43:19 25 4
gpt4 key购买 nike

什么是 CG相当于 GLSL功能 texelFetchOffset ?

最佳答案

根据 nVidia documentation :
tex2Dfetch - 在给定的采样器中执行未过滤的纹理查找。

使用以下重载之一:

float4 tex2Dfetch(sampler2D samp, int4 s)
float4 tex2Dfetch(sampler2D samp, int4 s, int texelOff)

int4 tex2Dfetch(isampler2D samp, int4 s)
int4 tex2Dfetch(isampler2D samp, int4 s, int texelOff)

unsigned int4 tex2Dfetch(usampler2D samp, int4 s)
unsigned int4 tex2Dfetch(usampler2D samp, int4 s, int texelOff)

参数
samp
Sampler to lookup.
s
Coordinates to perform the lookup.
The level of detail is stored in the last component of the coordinate vector.
texelOff
Offset to be added to obtain the final texel.

关于opengl - texelFetchOffset 的 CG 等价物,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12961232/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com