#Reducing shadow casters on HDRP / Entities.

1 messages · Page 1 of 1 (latest)

viscid gazelle
#

Is it worth it to merge meshes to reduce the number of shadow casters / draw calls on HDRP / Deferred rendering or will it not even change a thing?

frail notch
#

Merging meshes will tend to reduce the amount of draw calls, but make those draw calls more expensive to render on the GPU (there is more stuff in the draw).

If all parts of the merged mesh are visible, then this is typically a win, because all parts would have been rendered anyway and we did less work to set up the rendering.

However, it can also make it harder to visibility cull the draw, if the merged mesh becomes larger than the individual parts. For example, if only a small part of the merged mesh is visible, the whole merged mesh will still have to be rendered, whereas some parts might get culled if it was not merged.

Whether it will help or not depends a lot on your content and your project, and the only way to know for sure is to measure the speed.

viscid gazelle
#

draw calls are a problem for CPU only i think

#

right?

frail notch
#

Yes, for the most part draw calls are a CPU side issue.

#

I think merging meshes is unlikely to help on the GPU. To make the GPU time faster, you have to render fewer triangles and pixels (or use simpler shaders that are faster to execute), and merging meshes does not generally help with that (and can actually make things worse if it makes culling harder).

viscid gazelle
#

I see

#

Then merging is not worth it

#

My game is not high poly

#

but it has 100% gpu usage and less than 1% cpu

frail notch
#

I would recommend using a tool like Nvidia Nsight or Microsoft PIX to profile your GPU usage in more detail.