So here is something I am trying to do: - Given any object, a Cube for example, - Take it's object-space xz as uv coordinate, pass from vertex to fragment, - Sample a tiling texture in fragment. This works really well for the top face, but not so much for the vertical faces. - What I want to do, is to project all these vertical faces (vertices), to as-if they are on the same plane as the top face, so that the UV is continuous, but aligned to the top face. Questions: - I want to do it in the vertex shader, any tips on how can I make it happen? - I can probably hack to make it work on a cube, but how about any primitive shape? Thx!