//
//  Copyright (c) 2019-2020 Magic Leap, Inc. All Rights Reserved
//

#pragma arguments

float4 clippingPlane1 = float4(0);
float4 clippingPlane2 = float4(0);
float4 clippingPlane3 = float4(0);
float4 clippingPlane4 = float4(0);
float4 clippingPlane5 = float4(0);
float4 clippingPlane6 = float4(0);

#pragma body

float result = sign(dot(in.myPos, clippingPlane1)) + sign(dot(in.myPos, clippingPlane2)) + sign(dot(in.myPos, clippingPlane3)) +
               sign(dot(in.myPos, clippingPlane4)) + sign(dot(in.myPos, clippingPlane5)) + sign(dot(in.myPos, clippingPlane6));

if (result < 6) { discard_fragment(); }
