Hello,
I am updating an Alpha-only DataTexture on every frame to map a sphere and it doesn’t smooth very well with minFilter = THREE.LinearFilter when the sphere is small in the screen. Plus, I suppose it’s not very optimised to push so many pixels to the GPU at every frame, although the generation itself would not be faster with a smaller texture in my case.
I noticed that generateMipmaps didn’t… generate mipmaps of my DataTexture: The mipmaps property is an empty array at every frame (generateMipmaps is always set to true). I am not so much upset because, since I update the texture at every frame, I would rather update only the one version that is actually used by the GPU instead of updating every mipmap. I am just puzzled about it not working.
I am wondering if mipmaps are really supported with DataTexture. I didn’t have this issue in mind when I wrote my algorithm and I will have to do some refactoring to decouple the output definition before I can try anything.
I am also wondering if, considering my use case, there was any advantage of using mipmaps instead of updating the uniform of my material with a smaller DataTexture. I am having trouble figuring out how to know which texture size is needed, so I thought maybe mipmaps would help but if I need to update just one I need to know which one.
I am currently mapping a sphere, but I was thinking I could drop the sphere geometry altogether, use a plane geometry and handle the spherisation in the fragment shader, because i am planning on adding some projections as well, such as azimutal equidistant, so I guess it would be simpler to have the same geometry for everything. I’m not sure how to know what definition to use depending on the size of the resulting image relative to the screen since the resolution is not the same across the frame due to the deformations. I am not comfortable with this issue
I really hope I am clear. I am looking for advice from more experienced people more than I am looking for technical help.
Thanks in advance.