Window resizing = Squeezing everything together?

Me again. I’m sorry!

I don’t even know how to search for this.
“squeeze” didn’t seem to help.

That’s 4k lit spheres at different window sizes.
Let’s ignore that I seem to have issues with my fillrate. :stuck_out_tongue:
I reduced the resolution of the image of the first one a bit.


I don’t recall having ever observed such behaviour and I don’t know what causes it. I do notice that the frame timer
shrinks relative to the window size, but why would the spheres move closer together? What am I missing here?

Sorry! :slight_smile:

Strange, I’m not sure what would cause this. Providing more information would probably help, such as the code or shader you are using.

I’ll clean it up a bit and send you a msg with the zipfile.
I doubt it’s related to the shader, because I have a different program where this isn’t happening.
I have no idea what causes it. I only notice that everything looks like it’s being rendered onto a quad
that is being resized with the window … which seems logical, but still looks wrong.

In the meantime enjoy an image of two million lit spheres at 30fps.
I’ve tested with this image as well. Barely noticable from afar, but looks ugly upclose.

Full version:

Ah, so they’re point sprites. What happens is that the points stay the same size while everything else (including the distance between the points) is being resized due to the window getting smaller. This is because the value that gl_PointSize accepts is in pixels (for some strange reason), so you must multiply it with the screen size in order to have the points scale with the window.
This is one of the many quirks of hardware point rendering.

AAaaaahhhhhhhaaaaaaaaaa… Yes! headdesk
Yes, point sprites. I wanted GL_VERTEX_PROGRAM_POINT_SIZE for a good reason!

Thanks! :slight_smile: