I would like to write a shader to clip the space hidden by box from the view of the camera. The box data includes the box scale, position and rotation. I would also like to use _WorldSpaceCameraPos from the built-in shader constant. The space hidden by box is a conjunction of positive sides of up to 9 planes which I would like to calculate inside shader - basing on the four vectors above (rather than calculating in c# script and passing planes on every frame). Then the vectors for the planes will be used in the frag function to discard the pixels. I know how to write a function for this, but I need some hints how and where to put it in the shader file? Or it should be somehow placed inside the vertex function?