|
据techreport报道,在之前对Radeon X1000系列的报道中,曾说过其完全支持SM3.0。近日发现事实上并不是如此,在techreport的记者与ATI的工作人员联系之后,证实了Radeon X1000系列确实不支持SM3.0之中的vertex texture fetch功能。
但是VTF是Vertex Shader 3.0必须予以遵循的功能,ATI如何应对这个问题呢?对此ATI表示,在微软的VS 3.0规范中,只要Vertex Texture Fetch功能位被设置为具备即可,具体的纹理格式并没有做出要求。ATI更指出,如果想在非一体化着色器体系结构的GPU上实现VTF的话,是需要非常多的管芯空间来放置纹理cache,为了优先确保Pixel Shader方面的性能,因此ATI采取了一个折衷的方案:Render to Vertex Buffer(渲染至顶点缓存,R2VB)。
由于Shader Model 3.0的Pixel Shader都能输出包含4个FP32分量的128位浮点格式数据,这些数据都可以存放到4字符编码(FOURCC)的顶点缓存(存放顶点格式数据的地方),然后直接作为顶点数据传输给顶点着色器,以此来实现Pre-Displacement Mapping。
听起来缺少对vertex texture fetch的支持的问题是得到了圆满的解决,不过对此笔者依然抱有质疑的态度。毕竟和真正的Vertex Texture Fetch相比,R2VB可能就比较缺乏灵活性了。VTF中的纹理在VS内都是可以很快地作动态取样,顶点数据可以实现动态变更,更容易地加入几何LOD。
而Pre-Displacement Mapping的物理数据要发生改变的话,整个渲染过程也要随之配合变动,因此ATI也承认在R2VB不能和N-patch一起使用。
下面是当techreport的记者向ATI的David Nalasco问这个问题时的David Nalasco回答的原文: No, vertex texture fetch is not supported. However, since the X1000 family does all pixel shader calculations with FP32 precision, just like the vertex shader, it is possible to get the same results using the render to vertex buffer capability. Basically, you do a quick pre-pass where you render to a special linear buffer in which each pixel represents a vertex. Textures can be used to modify each vertex through the pixel shader, and the result is then read back into the vertex shader. The result is fast vertex texturing with full filtering support, without requiring any special hardware in the vertex shader engine. Note that render to vertex buffer is possible in R4xx as well, but is limited to FP24 which could cause precision issues in some cases. |