Facepunch / sbox-issues

175 stars 12 forks source link

Lighting Performance Issues/Glitches in Hammer and Scene #5494

Open anthonysharpy opened 5 months ago

anthonysharpy commented 5 months ago

Describe the bug

https://github.com/Facepunch/sbox-issues/issues/4432 and https://github.com/Facepunch/sbox-issues/issues/4759 both addressed issues with lighting performance. These have been closed, but the issue still remains.

For example, the rendering time increases by 10x when looking across the map (probably due to lights), giving 10-20 FPS:

https://github.com/Facepunch/sbox-issues/assets/55365296/184092f4-f486-4cc9-a732-6e7c8d3a788a

A couple of months ago it also seems some lighting changes were brought into Hammer, and now I can't really use it because the framerate is so low, and there are a lot of visual glitches:

https://github.com/Facepunch/sbox-issues/assets/55365296/54518f7f-7522-4348-b18b-2d5fb65e4f3c

Before the move to scene I was comfortably getting 50-120 FPS in-game and probably lots more than that in Hammer.

To Reproduce

Don't know for sure but probably lots of lights

Expected behavior

See above

Media/Files

No response

Additional context

Ryzen 5 5500 32GB RAM GeForce GTX 1660 SUPER

anthonysharpy commented 5 months ago

Has spread to the editor now after compiling the map. Works fine in-game for some reason.

image

anthonysharpy commented 5 months ago

Greatly improved by removing Hammer light probes (#5571) (getting more like 45FPS now). I think it's still a bit less performant than it used to be but not by much, I'm sure it will improve overtime anyway so the performance is no longer really the issue here. So the issues are just:

Also it turns out the lighting also doesn't work in game, it was just because I was disabling all the lights on scene start that it seemed to work

image

garrynewman commented 1 month ago

This done @samzanemesis ?

anthonysharpy commented 1 month ago

@garrynewman Still ongoing for me

image

samzanemesis commented 1 month ago

I did some things to improve perfomance on Lightbinner a bit but it's an ongoing process, tiled rendering should never get this fucked though, a reproduction step with your map attached would make it easier to verify

anthonysharpy commented 1 month ago

@samzanemesis I've invited you to a reproduction repo for this on GitHub

Any issues then let me know

samzanemesis commented 2 weeks ago

Try it again, should be good

anthonysharpy commented 2 weeks ago

@samzanemesis Thanks, the framerate definitely does seem a lot better and the lighting seems more functional for me. Still seem to be getting some issues with it though

https://github.com/user-attachments/assets/a5c1bf57-1905-4c7a-830d-428dddd66fea

Would it make a difference if I recompiled the map? I haven't done that in like months