Does If statement will cause bad performance?

Hello, I am trying to write Shader in Unity Engine.
Unity Engine uses ShaderLab.
I have 2 texture property, If I set Combine_Texture property to 1 then textures will be combined.
As you see there is one If condition if its true it combines the textures.
float3 Albedo = (( (float)_Combine_Texture == 1.0 ) ? ( tex2DNode7 + tex2D( _Texture_2, uv_Texture_2 ) ) : tex2DNode7 ).rgb;
Is this usage good or should I change the structure/algorithm for this? I don’t how performanced is this code.
Please help thanks.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.