Rendering GUI Nodes (DEF-3880)

I have a technical question related to the rendering of GUI nodes. In the attached picture you can see a drawcall function call of a sample program analyzed by GAPID. According to GAPID, rendering a GUI box node (and here it doesn’t matter whether the texture is set or not) is made by 18 triangles. What’s the prupose of it? Seemingly there are only 2 triangles in the picture, but despite this 18 are getting parameterized (Rendering the sprite component of the GameObject is made by 2 triangles).

Thank you in advance!

4 Likes

Could this have to do with 9-slicing? @sven?

Yes! We had a talk about it in the team and concluded that we really shouldn’t be outputting 9-sliced boxes for nodes that don’t have that option set… Adding an issue for it: DEF-3880

5 Likes

Thank you. In my case where there are about 800 gui nodes in a given scene and i don’t use slice 9, there are 14400 triangles being rendered instead of 1600 which is a great difference and at the same time useless. It also has great preformance impact.

7 Likes