After digging a little bit more into the performance issues I was having I found out that the whole rendering to volume texture is not a good ideia because it’s slow.
I’m not sure if this is true but it seems that every time glFramebufferTextureLayer is called, somekind of pipeline flush occurs. And even though its performance cost is small, when you multiply it by the number of layers you have to render (32 in my case) the performance drop becomes serious.
I ended up using a single 2D texture (which simulates an unwrapped 3d texture) to avoid all the layers changes during rendering and that trick provided me with a good performance increase.
Thanks for the help, guys.