@Superku: The potential performance issue with dynamic branching comes from frequently switching the branches, which is the case when you have rather small pixel patches for which the same branch will be taken. To prevent dynamic branching you can use the [flatten] attribute. No need to use a lower SM. There is also [branch] which forces dynamic branching, but my experience is that the compiler guesses quite well whether to flatten the if statement or not.
Last edited by Hummel; 03/18/13 18:01.