-
-
Notifications
You must be signed in to change notification settings - Fork 430
Eye blur effect #12430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eye blur effect #12430
Conversation
Changelog status: ✔️ |
|
Этот запрос на слияние был упомянут в Tau Ceti Station Forum. Там могут быть соответствующие подробности: https://forum.taucetistation.org/t/fludilka-chast-2/28659/28373 |
|
Оказалось, что со старым оверлеем (который был до фильтра), не лагало. По этой причине теперь опция не убирает эффект вообще, а переключает его на старую версию. Если у кого будут с этим проблемы, введём и 3-ю опцию полного отключения. |
| if(mob.eye_blurry) | ||
| game_plane_master_controller.remove_filter("eye_blur_angular") | ||
| game_plane_master_controller.remove_filter("eye_blur_gauss") | ||
| mob.clear_fullscreen("blurry") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
может просто вызывать update_eye_blur() тут?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В нем мы обновляем и убираем фильтры только по преференсам. Если у нас уже есть один из фильтров, то он застрянет для нас и не будет убран, ведь более не обновляется.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
там вроде как смотрит и на client.prefs.eye_blur_effect, флаг клиента, и на eye_blurry, флаг моба. Можно скорее всего учесть оба и сделать, чтоб всё корректно обновлялось в одном месте.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Честно, не понимаю как это сделать, что бы не срабатывало в холостую. Если мы имеем преф на новый блюр, то обновляется только новый блюр и процессинг ни коим образом не взаимодействует со старым, и наоборот.
| game_plane_master_controller.add_filter("eye_blur_angular", 1, angular_blur_filter(16, 16, clamp(eye_blurry * 0.1, 0.2, 0.6))) | ||
| game_plane_master_controller.add_filter("eye_blur_gauss", 1, gauss_blur_filter(clamp(eye_blurry * 0.05, 0.1, 0.25))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я, кстати, догадываюсь, почему оно могло лагать.
/atom/movable/plane_master_controller/add_filter(name, priority, list/params)
. = ..()
for(var/i in controlled_planes)
var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i]
pm_iterator.add_filter(name, priority, params)
Применяется фильтр не на плейн, а на гейм контроллер, а он в свою очередь создает копию фильтра для каждого из плейнов. Т.е. тут будет 13*2 (!!!) копий фильтра блюра!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если тебя еще не задолбало, можешь попробовать применить фильтр к plane_master/game_world/ и потестить?
Что-то вроде
var/atom/movable/screen/plane_master/game_world/PM = locate(/atom/movable/screen/plane_master/rendering_plate/game_world) in client.screen
PM.add_filter()
PM.add_filter()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если задолбало, вечерам сам могу сделать тестовую ветку, но мне потребуется твоя помощь для определения лагучести
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я только вечером смогу затестить и проверить лагучесть.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сделал по твоему предложению. Лаги почти полностью пропали, но всё же немного чувствуются. ФПС почти не просаживается, "замедление" времени тоже пропадает в таком варианте.
| game_plane_master_controller.remove_filter("eye_blur_angular") | ||
| game_plane_master_controller.remove_filter("eye_blur_gauss") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
осталось в других местах плейн изменить (почему я и предлагаю в одном месте сделать - так проще)
Для игрока
Если у вас начинает сильно фризить игра после попадания с лазера или нескольких сварок, то идёте в преференсы и ищите
Blur effect, переключаете его и проверяете.Описание изменений
Обсуждалась уже проблема с тем, что по попаданию в куклу и какое-то время после этого у некоторых игроков очень лагает. Такое я встречал и у себя на старой машине, при полном отсутствии на более сильной. Пообщался с несколькими игроками, у всех симптомы схожи: помутнение от лазера, 4 сварок.
Итак, данный ПР даёт возможность жмякнуть в вкладке
Preferencesна кнопкуBlur effect, что отключит этот фильтр для них, используя старый оверлей (туман по всему экрану). По крайней мере у моего ноута лаги пропадают.Почему и что этот ПР улучшит
closes #12037
Авторство
Страдания слабых ПК
Чеинжлог
🆑