Shallow flow or thin liquid film models are used for a wide range of physical and engineering problems. Shallow flow models allow capturing the free surface of the fluid with little effort and reducing the three-dimensional problem to a quasi two-dimensional problem through depth-integrating the flow fields. Despite remarkable progress of such models in the last decade, accurate description of complex topography remains a challenge. Interaction with topography is particularly critical for granular flows, because their rheology requires modeling of the pressure field, which is strongly linked to surface curvature and associated centrifugal forces. Shallow granular flow models are usually set up in surface-aligned curvilinear coordinates, and velocity is represented as a two-dimensional surface-aligned vector field. The transformation from Cartesian to curvilinear coordinates introduces fictitious forces, however, which result in complex governing equations. In this paper, we set up the shallow flow model in three-dimensional Cartesian coordinates and preserve three-dimensional velocity in the depth-integrated model. Topography is taken into account with a constraint on velocity. This approach is commonly applied by the thin liquid film community. The advantage is a curvature-free mathematical description that is convenient for complex topographies. The constraint on velocity yields a solution for the pressure field, which is required for the pressure-dependent rheology of granular materials. The model is therefore well-suited for granular flows on three-dimensional terrain, e.g., avalanches.