ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
683 stars 204 forks source link

Dynalights + sea + HDR visual issue #2466

Open lhog opened 7 years ago

lhog commented 7 years ago

HDR ON: screen00023

HDR OFF: screen00024

Happens only on water part of maps. Summoning @mtroyka (aeonios right?) for help.

aeonios commented 7 years ago

HDR rendering draws after water is drawn now. It's kind of a dumb way to do it tbh, but spring's half-baked deferred pipeline makes hax like that necessary. On the other hand I have no idea why it's turning the water black since it should still be using add blending which should only be capable of making things brighter.

Have you tried it using different water settings? What are the light settings for that shotgun projectile?

lhog commented 7 years ago

Water type doesn't affect this artifact. It only appears when water is deep enough and almost unseen in shallow water. screen00025

Shotgun just leaves most obvious artifact, many other weapons leave the same kind of effect, but of lesser magnitude.

Shipriot's gun doesn't have any light_* definitions.

aeonios commented 7 years ago

hmm, could you post a screenshot like that last one but without hdr enabled? I find it strange that the darkening only occurs with hdr. HDR really only changes the color buffer format and uses a tone mapping function, but neither of those things should lead to darkening afaik.

lhog commented 7 years ago

Sure.

Here HDR is on: screen00027

Here HDR is off: screen00028

Water depth is -133 and -17.

aeonios commented 7 years ago

Hrm, without hdr it seems like deep water isn't getting any lighting at all. I'll have to look into this and see if I can't figure out what's going on.