The uv variable is just a float2, but for the atlas i need a float4
(i have to save these coordinates: startx, endx, starty, endy).
how can i change the shader to implement a float4 variable?
The texture atlas is just a 2D texture which means you have to use a 2D position (float2) to sample it. The tex2D function can only sample one particular point in the texture, it cannot sample a 'range'.
Your startx, endx, starty, endy can indeed be stored in a float4 if you wish, and you can compute these values from the material id which PolyVox provides. You then need to combine these startx, endx, starty, endy with the texture coordinates for the particular fragment you are currently rendering, and this gives you the 2D position where you should sample the texture.
I don't have any code for this as I'm not using texture atlases myself, but if you search around this forum you might find something. But this isn't really a PolyVox issue, so you should also have a look elsewhere for any information you can find about implementing texture atlases. They are complex though. I'd still recommend you start by passing the textures through different texture units.