by Enjay » Sat Feb 22, 2025 3:51 am
Noticed in 4.14.0 plus git build from 21 Feb 2025.
Short version: Glitches on the surface of a scaled model can happen with Vanilla sector lighting mode.
dpJudas has provided both an explanation and a possible solution:
dpJudas wrote: ↑Sat Feb 22, 2025 3:32 am
Doom originally used different light calculations for sides and flats. The vanilla light mode doesn't know if something is a side or a flat, so what it does instead is to look at the normal of the surface and see if its mostly horizontal or mostly vertical. If its horizontal it uses the side math for the light, and if its vertical it uses the flat math.
The spots on the satellite dish must be exactly at the point where it changes mode. My guess is that scaling the model also scales the normal vectors on the model, but the vanilla light mode seemingly doesn't normalize the vector before using it. Perhaps adding a "normal = normalize(normal)" line in the vertex shader would fix the issue for that model.
More info in this thread:
viewtopic.php?t=80200
Example file:
https://aspectsweb.co.uk/enjay/doom/Tes ... ellite.pk3
Just load in Doom2 and play map01.
Screenshots:

Noticed in 4.14.0 plus git build from 21 Feb 2025.
Short version: Glitches on the surface of a scaled model can happen with Vanilla sector lighting mode.
dpJudas has provided both an explanation and a possible solution:
[quote=dpJudas post_id=1258642 time=1740216772 user_id=18514]
Doom originally used different light calculations for sides and flats. The vanilla light mode doesn't know if something is a side or a flat, so what it does instead is to look at the normal of the surface and see if its mostly horizontal or mostly vertical. If its horizontal it uses the side math for the light, and if its vertical it uses the flat math.
The spots on the satellite dish must be exactly at the point where it changes mode. My guess is that scaling the model also scales the normal vectors on the model, but the vanilla light mode seemingly doesn't normalize the vector before using it. Perhaps adding a "normal = normalize(normal)" line in the vertex shader would fix the issue for that model.
[/quote]
More info in this thread: https://forum.zdoom.org/viewtopic.php?t=80200
Example file: https://aspectsweb.co.uk/enjay/doom/TestStuff/Satellite.pk3
Just load in Doom2 and play map01.
Screenshots:
[imgur]https://imgur.com/HEaGsLF[/imgur]
[imgur]https://imgur.com/rnNRt5D[/imgur]