if-else in the Shader, in most cases (depends on specific Graphics API and hardware), is creating additional branches with the calculations at the level of Shader compilation. Let's say you have two textures and you validates using if-else ' what to display, and then check using if-else as it is for example to transform or to repaint. As a result, the Shader calculates all FOUR versions of the texture, and after it displays only one of them. Spice with another if-else, and the miscalculation has EIGHT versions of the texture. That is, in the Shader if-else statement "cuts" are not necessary part of calculations as in the script, and believes it, just shows only what has passed through all the checks.
Jailyn.Mayert answered on March 23rd 20 at 19:26
if-else Shader - bad, Yes.
But the reasons for the fall can be very different - should at least watch the code of the Shader. Well popratiloff worth it.