TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
581 stars 152 forks source link

Nonplanar faces sometimes not properly merging lightmaps #669

Open Spaghetti657 opened 2 years ago

Spaghetti657 commented 2 years ago

image

The angled brush face on the lower part of the wall is setup with a non-planar shader and intersects with another face with the same shader at its edge, so it should blend the lightmap across the faces. But as you can see it does not. Q3map2 builds from before 1.6.6 (April 2018) do not have this issue.

After going through testing various compiles It appears that a merge from 2018 caused the problem. From this pull request, specifically the addition of "origintwo" at lines 616-636 in light_ydnar.c (unsure if the link will actually work). If those changes are commented out, it results in the correct behavior:

image

I have no idea what the code is intended to do, so I am not making a pull request, but I figure someone else with more knowledge of what is going on here should look into it.