Author Topic: UITexture and draw call issue.  (Read 2107 times)

JSorrentino

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
UITexture and draw call issue.
« on: October 27, 2013, 04:44:40 PM »
I have a map panel that has quite a lot of components, of which UITexture is one (level map, the texture is the path between levels).

Draw calls for the panel are incurring one extra call for every UITexture object on the panel.  So if I have 1 of this UITexture objects active - it's 1 draw call, if I have 5, it's 5 draw calls just because of the UITexture.  The panel draw calls show the UITexture calls sequentially, one after another.

The UITexture is a simple plane with scrolling UV (thus not using a sprite).  I've remove the UV scroll to test and it makes no difference.

Is there a way to batch the UITexture draw calls into 1 call, as I would have expected them to be?  Unlit/Transparent Colored is the shader.

Thanks for the help, I hope I made this clear in what's going on, but would be happy to add anything to get an answer.

JSorrentino

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: UITexture and draw call issue.
« Reply #1 on: October 27, 2013, 05:05:55 PM »
Well, did it again.  Post a Question, then things pop.

I was using a dynamic material with the UITexture, so I created a material so that's it's shared and assigned it to the UITexture.

Problem fixed.

Posting this to maybe help anyone else with the same issue.

Thanks, sorry to bother!