DaemonEngine / Daemon

The Dæmon game engine. With some bits of ioq3 and XreaL.
https://unvanquished.net
BSD 3-Clause "New" or "Revised" License
306 stars 60 forks source link

Heat haze wrong at edges when view size != window size #1437

Open slipher opened 1 week ago

slipher commented 1 week ago

I found this by reducing the view size with the sizedown command. It might happen with portals too, but I haven't tested. The bug is the blue texture not going all the way to the top of the viewport.

unvanquished_2024-11-13_234114_000

I also checked with /testshader gfx/weapons/flamer/haze to verify it is not something special about the forcefield shader. This one shows that the bug with textures not extending to the edge of the view when they should also applies to surfaces other than the one containing the heat haze.

unvanquished_2024-11-13_235211_000

VReaperV commented 1 week ago

Is this a common use case? It would require to add some extra logic to the shader to fix it, since right now it just uses the entire current colour buffer as input.

slipher commented 1 week ago

Is this a common use case?

sizedown certainly isn't common. We have been asked about leaving black bars on the sides for very wide monitors, although I don't think there's any way to configure it currently. At least it can happen with portals (see the red left side of the monitor bleeding into the portal):

unvanquished_2024-11-16_063441_000

It would require to add some extra logic to the shader to fix it, since right now it just uses the entire current colour buffer as input.

Could we define a sub-image with this so that we don't have to change the shader?

VReaperV commented 1 week ago

Could we define a sub-image with this so that we don't have to change the shader?

glTexSubImage*() only deals with uploading data. Texture views might work, though they require either an extension or GL 4.3+.