Страница 1 из 1

RenderTexture.SetActive пожирает время

СообщениеДобавлено: 18 июн 2012, 22:01
trololoid
Изображение
Что означает RenderTexture.SetActive и почему оно такое голодное?
В проекте не используется рендер в текстуру, на камере из эффектов только антиальясинг.

Re: RenderTexture.SetActive пожирает время

СообщениеДобавлено: 23 июн 2012, 19:39
trololoid
Не буду писать "ап", а напишу, что он продолжает это делать.

Re: RenderTexture.SetActive пожирает время

СообщениеДобавлено: 23 июн 2012, 21:18
Battle Angel Alita
vsync?

Re: RenderTexture.SetActive пожирает время

СообщениеДобавлено: 23 июн 2012, 22:19
trololoid
Don't Sync. Если работает Vsync, то называется WaitForTargetFPS.

Re: RenderTexture.SetActive пожирает время

СообщениеДобавлено: 29 окт 2012, 20:12
demander
Тоже заинтересовал этот вопрос, рендерёных текстур нет, есть кубмапы, и пара сложных шейдер с малтиплаем текстуры на текстуру через параметр. что жрет время под названием RenderTexture.SetActive очень интересно.

Re: RenderTexture.SetActive пожирает время

СообщениеДобавлено: 29 окт 2012, 22:31
Woolf
demander писал(а):Тоже заинтересовал этот вопрос, рендерёных текстур нет, есть кубмапы, и пара сложных шейдер с малтиплаем текстуры на текстуру через параметр. что жрет время под названием RenderTexture.SetActive очень интересно.


А вот кстати тут народ уже задавал вопрос:
http://answers.unity3d.com/questions/21 ... pikes.html

Figured out the problem immediately, and with any hope this might deliver insight to anyone else who has had the same issue. My GPU went from approximately 100FPS to 2000FPS by switching the "maximum prerendered frames" property in the Nvidia control panel for Unity.exe from 0 to 3. 3 is the default number, but it's worth checking, especially if you might have changed it. (You have to exit Unity after changing the setting.) You could potentially set the number even higher, and maybe it will fix something.

[edit:] the spikes themselves still seem to happen, but the FPS on average has become a lot faster, so I can't complain. Plus the highest spike I've seen yet is 45ms compared to 332ms before.

[edit2:] Currently wondering when my FPS from this project went from 650ish to 100. Regardless, I'm happy with this.