performance issues with textures

I’m trying to load a 2048x1024 video file in Panda and performance drops on the device to 8 fps.
I believe there’s something else being the issue other than just the performance of the device (1gb RAM, AMD 1GHz APU with Radeon graphics).

For starters, the file plays fine at normal framerate in video players on the same device. I have nothing else going on in the Panda program at this point.

I’m unable to use “textures-power-2 up”, textures are not transformed correctly. Only “textures-power-2 none” works, which I think enables non-power-of-two textures. I’ve read that non-power-of-two textures can be slow for some hardware.

Also, when I check the files in VLC, in the codec section there’s “display resolution” which is few pixels more and there is just “resolution”.

Also, if there are some video codecs known to run faster in Panda please let me know.

It would be helpful to use PStats to see where the bottleneck lies. Also, if you give me your video file, I could try it out for myself and see if there are any obvious bottlenecks that could be addressed; sometimes it is just a matter of flipping the right configuration switch.

textures-power-2 does not scale videos, only images. Scaling a video each frame is too slow, so Panda pads the video instead. This needs to be compensated for on the card to which the texture is applied, by scaling the texture coordinates (there are convenient methods to do this).
However, modern hardware doesn’t have an issue with NPOT textures, so it’s fairly safe to leave it to “none” nowadays.

This APU hardware seems to need that and seems to have problems with NPOT. What are the convenient methods you mentioned?

Are you using CardMaker to generate your card? If so, use


You can also use tex.getTexScale() to get the amount to scale the texture coordinates by when sampling the texture using a shader, or np.setTexScale, or something of the sort.

What about texture buffers and values. Does “textures-power-2” affect them?

BTW, this is unrelated, but the resoution values for are for individual cubemap sides, not some single atlas, right?

Yes, texture buffers are padded, too. As for cube maps… I suggest you make them a power of two regardless, since it’s not possible to pad them.

And yes, the resolution for makeCubeMap is the dimension for a single side. If you select 512, you will end up with six 512x512 images.

I see , thank you.

I think 512x512 cubemap faces should be enough for rendering a 2048x1024 equirectangularly mapped sphere from the inside into a 720x720 fisheye camera.