DarkPlacesEngine / DarkPlaces

The DarkPlaces Quake engine, created by LadyHavoc. Official Git repository (replaces SVN).
https://icculus.org/twilight/darkplaces/
GNU General Public License v2.0
286 stars 40 forks source link

.rtlights With Negative rgb values render differently than Classic DarkPlaces #162

Open Baker7 opened 7 months ago

Baker7 commented 7 months ago

Although this is cool looking ...

xon_20240407_negative_value_rtlight_color_pcts (Pictured E1M2 early bridge in Quake Combat+)

It is supposed to be really bland looking in that area ... and it is with any "non-DarkPlaces Beta" versions of DarkPlaces like xonotic 2017 or DarkPlaces 2014 etc.

.rtlights for e1m2 ...

!1108.000000 196.000000 378.000000 450.000000 1.885909 -0.000000 -1.347077 0 "" 1.000000 0.000000 0.000000 320.000000 0.280000 -1.000000 1.000000 1.000000 3

Negative color ... negcolor

What I did in Zircon was to clamp the red/green/blue on reading the rtlights colors from file. However, that is covering up whatever the true cause is.

Back at the time, I extensively compared the GLSL shader and the read of the .rtlights file and could not identify the cause of the issue, so I clamped it on input to cover up the issue and get the result without identifying and fixing the underlying issue (since I was not able to figure out what the cause was).