Horrible performance or not ?

Started by
9 comments, last by bronxbomber92 11 years, 8 months ago

[quote name='Hodgman' timestamp='1345283090' post='4970783']
There's no point clearing any buffer that you're going to overwrite the contents of later on. Assuming that geometry always fills your entire screen, then new geometry is going to fill your g-buffer anyway, so clearing it is a waste of time.


In this case and in general this is true.

However, there is a point clearing the render targets and that is the case when using SLI/Crossfire setup. That is one of the ways that the driver is able to recognize which surfaces aren't needed by the other GPU and may skip the transfer of framebuffer between the GPU memories. So keep your clear code there for the case when number of GPUs is bigger than 1.

Otherwise, you may save some bandwidth if you use the hardware z-buffer for position creation instead of using another buffer for depth. The quality isn't as good, but should be enough for typical scenarios.

Best regards!
[/quote]

[quote name='lipsryme' timestamp='1345282612' post='4970781']That is the first time I've heard that, can you elaborate why ?
There's no point clearing any buffer that you're going to overwrite the contents of later on. Assuming that geometry always fills your entire screen, then new geometry is going to fill your g-buffer anyway, so clearing it is a waste of time.
[/quote]

There's another reason to clear render targets on tiled architecture GPUs that are prevalent on mobile devices; according to Unity's talk at Siggraph this year, clearing render targets can avoid extra copies done by the driver. So if I'm reading the slides correctly, the render target clear can act as an equivalent of EXT_discard_framebuffer operation on devices that don't expose that extension.

This topic is closed to new replies.

Advertisement