【发布时间】:2014-09-16 21:44:47
【问题描述】:
以下是 GLSL 规范的摘录:
“纹理查找功能在所有着色阶段都可用。但是,仅对片段着色器计算自动细节级别。其他着色器的操作就像基本细节级别被计算为零一样。”
这就是我的看法:
顶点着色器:
vec4 texel = texture(SamplerObj, texCoord);
// since this is vertex shader, sampling will always take place
// from 0th Mipmap level of the texture.
片段着色器:
vec4 texel = texture(SamplerObj, texCoord);
// since this is fragment shader, sampling will take place
// from Nth Mipmap level of the texture, where N is decided
// based on the distance of object on which texture is applied from camera.
我的理解正确吗?
【问题讨论】:
-
我的理解是否正确。