Tuxer
Tuxer

Reputation: 753

performance on GLSL "for" instruction

Hi I'm doing fractal work using GLSL, and I need to use the "for" instruction. Is is better (performance-wise) 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 :)

Upvotes: 2

Views: 229

Answers (1)

Damon
Damon

Reputation: 70206

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.

Upvotes: 1

Related Questions