Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在着色器中,哪个通常更便宜,分支(如果等)或纹理读取?
纹理读取,通常。分支机构通常非常昂贵。当然,从没有 mip-map 的超大纹理读取的各向异性纹理也是如此,因此您需要相应地对其进行分析。
顺便说一句,在某些情况下,您还可以使用 [predicated] 指令。
编辑:我应该提到显而易见的 - 在您的输出中,查看数字以查看您是序列器绑定还是纹理绑定。