scp-fs2open / scp-fs2open/fs2open.github.com

Supernova sun glare and fade regressions

Open
#4,152 12 comments 0 reactions 0 assignees View on GitHub
bug graphics regression Waiting for Stable
Dominant language
C++
Stars
487
Forks
184
Avg merge
3d 8h
Merged PRs (30d)
45

Description

There are a few regression bugs that were introduced at some point -- including but possibly not limited to ffc14f5d9e52de58008de2998c6c641c656886ae -- related to how the sun glare is treated during the supernova impact.

The attached image sequence shows what it looks like in retail...
1) When the supernova is close, the glare should affect the whole screen even when the player is not looking at the sun. This does not currently happen in FSO. The `Sun_spot` variable is supposed to color the screen using the same mechanism as the red "pain flash".
2) The glare is a lot more dramatic in the retail letterbox scene than the FSO letterbox scene.
3) In retail, the glare always affects the camera's view of the player. In FSO, this does not happen unless the sun happens to be near the camera's view direction.
4) The screen fades to white in retail. In FSO this is again dependent on the camera direction.

Part of this is due to the introduction of light shafts in the above referenced commit. When I modified `gr_lightshafts_enabled()` to return false if a supernova was in progress, this almost entirely fixed the problem - the glare behaved as it was supposed to. However there are still two deficiencies:
1) Disabling light shafts when a supernova starts could abruptly remove any lightshafts currently on the screen.
2) During the letterbox scene, the entire screen faded to white, not just the part inside the letterbox.

---

![sup1](https://user-images.githubusercontent.com/1878523/162359352-afc30ca0-4994-454a-9cf3-d573507f2c4f.jpg)
![sup2](https://user-images.githubusercontent.com/1878523/162359354-8b14d899-e163-4e49-9737-d12c37b48c27.jpg)
![sup3](https://user-images.githubusercontent.com/1878523/162359355-de717607-3fa2-4205-988d-fbccfcf2cb68.jpg)
![sup4](https://user-images.githubusercontent.com/1878523/162359356-15afa462-f667-46c1-832b-f58c4e1f4e99.jpg)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.