fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

Nebula Lightning triggers glTexSubImage3D() every time a lightning effect happens

Open Shivansps opened this issue 5 months ago • 0 comments

I discover this on the android-port / GLES path, im trying to confirm it happens on desktop gl as well, but i dont see any reason why it would be diferent in ES. After testing several missions on ES and watching ingame use of glTexSubImage3D() seems to be limited to opening menus on regular missions after loading happens. But its diferent on nebula missions, as every lightning effect seems to trigger the texture upload every time. On ES this is very bad because it triggers the pixel conversion format to adjust to formats supported on ES. But i would guess this may have an effect on weaker GPUs on desktop as well, like IGPs.

I dont know how the system works to investigate it more, and particually why the lightning textures arent being cached on load.

Note: for compressed textures, glCompressedTexSubImage3D() is called instead.

Shivansps avatar Sep 14 '25 15:09 Shivansps