float3 BlinnPhong(float3 LightStrength, float3 lightVec, float3 normal, float3 toEye, Material mat){ if (useBlinnPhong) { float3 halfway = normalize(toEye + lightVec); float hdotn = dot(halfway, normal); float3 specular = mat.specular * pow(max(hdotn, 0.0f), mat.shininess * 2.0); return mat.ambient + (mat.diffuse + specular) * LightStrength; } else { ..