PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
37 stars 8 forks source link

Sun lensflare not in center #239

Closed kai-li-wop closed 7 months ago

kai-li-wop commented 7 months ago

Looks like the sun and sun lens flare is not in center any more. See screenshot, should be at position of crosshair. Probably due to changes made with wscreen.

shot0000

kai-li-wop commented 7 months ago

Code is in cg_lensflare.c. Seems not be an easy fix by simply applying "CG_SetScreenPlacement(PLACE_CENTER, PLACE_CENTER)" because it only centers the 640:480 ref screen and you then can see the edges in narrow and wide screen, where the lensflare effect is cut. Looks ugly.

mgerhardy commented 7 months ago

CG_AdvancedDrawPicA or the refdef2D still has a problem to cut off parts of the lensflares in wide screen mode

lensflares

kai-li-wop commented 7 months ago

I closed it probably by accident.

kai-li-wop commented 7 months ago

upper screenshot is with CG_SetScreenPlacement(PLACE_CENTER, PLACE_CENTER)! The following one is without it.

Image

kai-li-wop commented 7 months ago

@mgerhardy: I have briefly tested many different formats. The good news is that nothing is cut off any more. The bad news is that the effect becomes more oval the wider the image becomes. In the 5:4 format it is then higher than it is wide. The effect is only really round in 4:3 format. This should actually be decoupled. The effect should always be round, regardless of the image format. It is currently being stretched.

16:9

shot0000

5:4

shot0001

4:3

shot0002

kai-li-wop commented 7 months ago

240 has solved the issue for me. The lens flare now displays correctly in any screen resolution and aspect ratio. Great work and thanks to all contributors. The codebase looked pretty messy before ;)

3aTmE commented 7 months ago

Just tested it with resolutions both in 4:3 and 16:9 aspect ratios and confirm this fix as working flawlessly! 👍