New update broke rendering

i updated the engine to 1.9.7. The rendering in my game uses a camera game object with a camera in it. It seems that a lot of the defaults were changed in-between engine versions, since i had to change stuff just to get the game to look right in windowed mode.
the game is intended to have a fixed viewport size (this was the default rendering mode before), and somewhere along the line, this was changed, and now fullscreening the game has the effect of looking all zoomed out.
i tried adding a msg.post("@render:", "use_stretch_projection",{near=-1,far=1}) to the bottom of the init function of my camera GO’s script, but that didn’t do anything.


2 Likes

Hm what version did you update from? We haven’t changed any defaults for camera that I’m aware of

i don’t remember. it was 1.9.something, i’m pretty sure.
steam auto-updated it in the background, if that helps establish a timeline.

Would you be able to share a repro? We have done some camera work, but the intention was not to break anything. I think we fixed one issue with DPI not being used for some camera related thing, but afaik it was a bugfix :thinking:

i made a minimum reproducible example here:
example of issue.zip (4.0 KB)

1 Like

Thanks!

Using the camera, there was a Defold update that made things look bigger on the screen. Then another update made them smaller again. This without me changing anything in the project.

My notebook has a 13.3 inch screen, so Windows uses a 150% aspect ratio. I don’t know if this is related. When my project is set to 836x470 the game screen is 1254x705 in window.get_size().

There were issues previously with the DPI values returned on non-macOS platform being incorrect. This could potentially have cause projection changes

i don’t see why DPI would matter on a projection whose intent is to disregard DPI in the first place.
that and the view does scale as you would expect when not using the seperate entity+camera (as well as the documentation for projections) leads me to believe that that is an oversight

Ah sorry, I meant display scale factor (retina screens, ui scaling on windows etc) is part of the orthographic projection: defold/engine/render/src/render/camera.cpp at c32d364b9bce98d50b54278992516f69a3a74d44 · defold/defold · GitHub

For whatever reason, the display scale was always one on windows and web before I fixed it a few releases back, which could potentially explain changes in projection sizes. But I’m not sure

well something there definitely isn’t working right, since i can’t even change the aspect ratio to emulate the old camera behavior of a stretch fit - it has no effect.

Ok that sounds like a regression, I’ll take a look