Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

GPU spike from RenderTexture.SetActive

Discussion in 'Editor & General Support' started by TommiH, Aug 8, 2019.

  1. TommiH

    TommiH

    Joined:
    Jan 14, 2008
    Posts:
    252
    We're additively loading small scenes containing terrains. Unfortunately, every time we load one, we get a GPU spike from the RenderTexture.SetActive function, under Terrain.UpdateHeightmapTexture. Our heightmaps aren't particularly big (1024x1024), so I'm pretty stumped about what could be calling this. All I know is that if I strip our main scene (not the small scenes I'm loading) to bare minimum, the spikes go away. So somehow either the size of our scene or something specific in the scene is causing this.

    Any thoughts would be greatly appreciated. Profiler - RenderTexture.SetActive.PNG