Occlusion and performance
What is best regarding performance when implementing a scrolling bar which is mostly occluded by a mask (layer)?
See the speed tape on the left, an altitude tape on the right, and a compass rose on the bottom:
Animated in this video:
https://www.youtube.com/watch?v=ECV3IBkzZLc
If I make one huge bar with numbers and dashes, will it render the whole thing, even though most of it is occluded? I can make the bar much shorter and then reset the position at appropriate intervals to create the illusion of continuous movement. This would require re-using text boxes and changing the numbers, but it is achievable. Just more work.
Another related question:
Can all the dashes be batched into a single draw call?
See the speed tape on the left, an altitude tape on the right, and a compass rose on the bottom:
Animated in this video:
https://www.youtube.com/watch?v=ECV3IBkzZLc
If I make one huge bar with numbers and dashes, will it render the whole thing, even though most of it is occluded? I can make the bar much shorter and then reset the position at appropriate intervals to create the illusion of continuous movement. This would require re-using text boxes and changing the numbers, but it is achievable. Just more work.
Another related question:
Can all the dashes be batched into a single draw call?
Re: Occlusion and performance
Being all the elements in the huge bar probably the same draw call (it seems you are using solid colors) I would say that the masking mechanism implemented in the GPU using stencil is going to be fast enough. Anyway, you should benchmark it and see the results. If you need help, just share your numbers with us. Probably we can help.If I make one huge bar with numbers and dashes, will it render the whole thing, even though most of it is occluded? I can make the bar much shorter and then reset the position at appropriate intervals to create the illusion of continuous movement. This would require re-using text boxes and changing the numbers, but it is achievable. Just more work.
Dashes are not different to the rest of element regarding batching. Rules described in the optimizing document apply to them. So for example, if all the dashes use solid colors, they will be grouped in the same drawcall.Can all the dashes be batched into a single draw call?
Re: Occlusion and performance
Thanks, will do a benchmark and publish the results.
Also, I have some render textures which don't change much. Do I need to use a certain API to make sure it doesn't re-render the texture every frame, or is that done automatically?
Furthermore, I noticed this sentence on the perf page:
Also, I have some render textures which don't change much. Do I need to use a certain API to make sure it doesn't re-render the texture every frame, or is that done automatically?
Furthermore, I noticed this sentence on the perf page:
Shouldn't that read "increase rendering performance" instead?Use dictionaries to share resources whenever possible. This is an important factor to reduce memory but it is also important to reduce rendering performance because it allow us to improve batching.
Re: Occlusion and performance
Right now render textures are rendered on each frame but this could be improved. In fact, we are working in a dirty rects algorithm to generalize this and only redraw parts that changed (not only in render textures).Also, I have some render textures which don't change much. Do I need to use a certain API to make sure it doesn't re-render the texture every frame, or is that done automatically?
But I think that the first step (fully draw or not) can be easily done. Can you file a report please? (important: this won't be done for v1.2.0, where feature are closed)
Yes, fixed. Thanks!Shouldn't that read "increase rendering performance" instead?
Who is online
Users browsing this forum: No registered users and 3 guests