How to pass a float3 to a customized uv?

I need to convert a vector form world space to tangent space in an unlit material. I realized I can save a few instructions by performing the conversion in the vertex shader and pass the result using customized UVs, but seems the TexCoord nodes only outputs float2 values so I cannot pass float3 vectors from the vertex shader to the fragment shader. Is there any way to use float3 (or even float4) texture coordinates?

Everything you want can be done, but not within the material editor. There is no vertex to fragment struct access in the material editor. Everything happens in the fragment shader, except for whatever you do in the world position offset. So you would have to dive into the shader code. Here is a good starting point: