MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by drfrag » Wed Jun 12, 2019 7:56 am

That's what i'm going to do, it's this commit in the middle of the level refactor: "- changed light mode handling of the hardware renderer so that it only operates on local copies but doesn't alter the level's setting."
No big deal, ZD software it's used instead.

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by Graf Zahl » Wed Jun 12, 2019 6:31 am

Forget it. The software light modes are hardly relevant for hardware that have no shader support. Those on better hardware shouldn't use the legacy builds anyway.

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by drfrag » Wed Jun 12, 2019 6:28 am

This can't be fixed in the legacy build AFAIK, no big deal tough. I missed the MAPINFO part hidden in "- use symbolic constants for the light modes." since there were a lot of conflicts.
Back then lightmode was in level_info_t and not in HWDrawInfo.

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by _mental_ » Wed Jun 12, 2019 12:50 am

Fixed in 7e90105.

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by Graf Zahl » Tue Jun 11, 2019 4:24 am

This is due to how the lightmodes get checked. The light mode doesn't get passed to the shader directly, it is only being used for calculating light levels on the CPU side, but for software lighting this must be done in the shader. And this value wasn't properly set up because apparently when implementing this, it was overlooked that the light mode can not only be set by the CVAR but also through MAPINFO.

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by Nash » Tue Jun 11, 2019 4:18 am

While those assumptions are correct, what really happens is that MAPINFO lightmode gets ignored only for setting 16. For other lightmodes, (all of them up to 8), it works exactly as your assumption - meaning, the MAPINFO override value is used, and changing the CVar has no effect.

But when lightmode 16 specifically is used as a MAPINFO override, lightmode 8 gets enforced in the game view.

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by _mental_ » Tue Jun 11, 2019 4:11 am

If I got everything right, light mode from MAPINFO should override user's choice.
In other words, gl_light mode CVAR should have no effect when light mode is defined.
Currently, the latter is ignored as the CVAR is read directly.

In case my assumptions are correct, here is PR with the fix.

Re: MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by Nash » Mon Jun 10, 2019 8:18 am

I have updated the OP with a test file. Goes without saying that your current lightmode user setting (in the Options menu) must be set to something else other than Vanilla to actually see that the feature isn't working.

MAPINFO lightmode 16 doesn't work g4.2pre-142-g324a720d5

by Nash » Mon Jun 10, 2019 7:47 am

When setting a map's "lightmode" property to 16 (Vanilla), the map just ends up getting the "Software" lighting instead. It seems that lightmode 16 via MAPINFO just does not work.
Attachments
LightModeTest.pk3
(3.8 KiB) Downloaded 40 times

Top