gpt4 book ai didi

opengl - 在哪里可以找到有关 OpenGL 着色器函数 texture2DRect() 的文档?

转载 作者:行者123 更新时间:2023-12-04 22:50:33 27 4
gpt4 key购买 nike

我通常是一个自给自足的 Google 员工,但我找不到任何关于 OpenGL 着色器函数的文档 texture2DRect() .有没有人遇到过这个?

它正在一些示例代码中用于在 openframeworks 中编写着色器,所以我知道它存在并且可以工作,只是找不到任何官方文档。我在哪里可以了解有关此功能的更多信息?

最佳答案

该函数用于对 2D 纹理矩形(NPOT 纹理目标)进行采样,它在 GL_ARB_texture_rectangle extension 的“OpenGL 着色语言规范的 1.10.59 版的补充”中指定。 .:

Add to section 8.7 "Texture Lookup Functions"

Syntax:

vec4 texture2DRect(sampler2DRect sampler, vec2 coord)
vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord)
vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord)

Description:

"Use the texture coordinate coord to do a texture lookup in the
rectangle texture currently bound to sampler. For the projective
("Proj") version, the texture coordinate (coord.s, coord.t) is
divided by the last component of coord. The third component of
coord is ignored for the vec4 coord variant.

No "bias" parameter or "Lod" suffixed functions for rectangle
textures are supported because mipmaps are not allowed for
rectangular textures."

关于opengl - 在哪里可以找到有关 OpenGL 着色器函数 texture2DRect() 的文档?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6736531/

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