开发者

performance on GLSL "for" instruction

开发者 https://www.devze.com 2023-02-28 14:06 出处:网络
Hi I\'m doing fractal work using GLSL, and I need to use the \"for\" instruction. Is is better (performance-w开发者_如何学Cise) to do a for instruction n times, or to redirect the ouput of the shader

Hi I'm doing fractal work using GLSL, and I need to use the "for" instruction. Is is better (performance-w开发者_如何学Cise) to do a for instruction n times, or to redirect the ouput of the shader on a FBO, and apply the shader n times on a FBO? Thanks :)


Applying a shader n times will definitively be more expensive. It will not only be more expensive due to the actual shader, but also due to texture fetch and ROP. Plus, rebinding buffers and synchronization.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号