I’ve noticed that my in-game images are quite a bit blurry compared to the original images. In the past, I figured that this was due to problems with scaling. But I’ve now corrected for that, I’m still getting problems:

For a full screen image with the original image the same exact size as the game screen this should work:

self.image = OnscreenImage(image = "Story/titlescreen.png", scale = base.camLens.getAspectRatio(), pos = (0,0,0))

This image shows the problem. The top image is a zoom-in of what I get in-game. The bottom is the source image. As you can see, it looks pretty bad compared to the original.

I’ve heard about there being a half-pixel problem with text and Windows with OpenGL is this a similar problem? Any ideas on how to fix this?

that sounds like the infamous “your texture is not a power-of-2-size and thus gets reascaled automatically to a lower resolution” problem.
try to use power of 2 textures. or enable non-power-of-2 textures in your config file.

Thanks, that did it. It does kind of suck though that you have to go through all that math to just get it to scale it as it should be. Also I had to cut up my image to smaller power of 2 images to cover the screen space.

But it worked. Here’s a screenshot with my wormhole shader running on the title screen.

You could turn your image to 3d flat model (Blender has a script for that) and attach it to render2d. You dont really need power of 2 in this case and rescaling the window isnt a problem, too.
But monkey in my head can be wrong

Anon : the thing is. the gpu prefers power-of-2-textures. old gpu’s can handly po2textures only. modern gpu’s have support for arbitarily sized textures but po2textures are still prefered. because panda , by default settings, tries to keep maximum compatibility with all kind of hardware, including old one. panda rescales non-power-of-2 textures to the nearest power-of-2-size. that’s when it gets blury. you can explicitly tell panda to use those non-power-of-2-textures if the gpu supports them. but it’s not advised unless really neccessary.

Do you mean images or textures?

textures. but usualy you load them from images. so your images should be a power-of-2 if you are going to use them as textures (which is usualy the case)

I dont know,

image = loader.loadModel( "image" )
image.reparentTo( aspect2d )

this seems to work without power-of-2 by default

Well, Anon, I haven’t had the same luck. The code you have would have given me a very blurry image.

I think ThomasEgi was right, despite all my proper scaling to get pixel perfect images, it just wasn’t working- and when I chopped up my images into multiple power of 2 images it worked.

“Work” as in “no error, no crash”, yes, but the resulting image is blurry. That’s why it, in fact, doesn’t work.

Must have enabled non-texture of 2 at some point, sorry about that