作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我通常是一个自给自足的 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/
我是一名优秀的程序员,十分优秀!