DaemonEngine / Daemon

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

Missing candle flame/fire in Metro map #997

Open illwieckz opened 9 months ago

illwieckz commented 9 months ago

Extracted from this issue that described two bugs:

This thread is for the missing candle flame/fire sprite effect.

It is believed the bug is related to:

illwieckz commented 9 months ago

Missing flame:

unvanquished_2023-12-15_024400_000

unvanquished_2023-12-15_024822_000

unvanquished_2023-12-15_024852_000

unvanquished_2023-12-15_024903_000

unvanquished_2023-12-15_024947_000

slipher commented 1 month ago

I have work in progress for nuking the GLSL-based autosprite implementation as described in https://github.com/DaemonEngine/Daemon/issues/1246#issuecomment-2302015811. I guess the flames must all be rendered with the lightMapping shader because that's the part that didn't work with autosprites. Now they show up.

unvanquished_2024-09-04_004103_000 unvanquished_2024-09-04_004235_000

illwieckz commented 1 month ago

Excellent!

slipher commented 4 weeks ago

I guess the flames must all be rendered with the lightMapping shader because that's the part that didn't work with autosprites.

Actually I think those specifically were broken because they are not opaque. The depth fade code intended for soft particles (unwantedly) runs for all sprites, including BSP ones. For opaque surfaces, alpha is ignored so the depth fade has no effect. For autosprite2 surfaces, the depth fade code gets run with a negative depth value which results in undefined output from the GLSL smoothstep function. So transparent autosprite2 surfaces don't show up.