Skip to main content

Timeline for Better solution for boolean mixing?

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Jun 28, 2013 at 0:13 comment added Ruben Nunez Oh, right. I remember reading something like that. I guess I must've forgotten it x_x. Thanks for the reminder, though. =D
Jun 28, 2013 at 0:08 comment added Sean Middleditch @RubenNunez: non-uniform branches are a problem but uniform ones should be fine. Uniform branches are, essentially, those that only depend on constant and uniform variables and not on per-vertex/per-fragment data. That is, all shader executions follow a uniform code flow. The slowness of branching on GPUs is that in the non-uniform case, every shader ends up executing both branches but throwing away the unused case. When it's uniform, or the branched-to code is very short/cheap, things work much better.
Jun 28, 2013 at 0:02 vote accept Ruben Nunez
Jun 28, 2013 at 0:02 comment added Ruben Nunez Oh, I see. I thought that branches/conditionals in general were still pretty slow. Since that isn't the case, though, I may as well write the two versions into the shader and have the one I'll use enabled with a boolean #define during compilation. Thanks a lot for this information. =)
Jun 27, 2013 at 23:52 history answered user1430 CC BY-SA 3.0