EntroPi-Games / GPU-Line-of-Sight

GPU Line of Sight / Field of View visualization for Unity
Apache License 2.0
129 stars 24 forks source link

Target Texture "TempBuffer" out of bounds #6

Open alppih opened 2 years ago

alppih commented 2 years ago

Heya! I'm having an issue in my project regarding LOS Sources, pictured below.

v01TempBuffer

The "Target Texture" field keeps accumulating this TempBuffer value, about 100-200 per second (about 348k in the picture) until it reaches millions in a few hours, eventually resulting in an error message "Resource ID out of range in GetResource: 1048576 (max is 1048575)" which forces a restart. While all this is happening, the Field of View flickers between my set value of 100 and something like 129. What might be doing all this?

The one pictured above is a Basic Los Source, while I am also using a 360 one with a 512 render target width/height. Using Unity 2020.3.12f1

EntroPiGames commented 2 years ago

Looks like something weird is going on with the resolution of the target texture. It should be 2048 x 2048, but looks like it's set to 4096 x 4096.

Can you try setting the FOV of the camera to vertical instead of horizontal?

alppih commented 2 years ago

Cheers - Been trying that, no change. The resolution of the target texture is always double the value of the value I set it to be, like above. The case is the same with the 360 one; my values of 512 become 1024x1024. That TempBuffer-value stops increasing while the game is on, though.