Search Unity

How to render thousands of bullet holes with good performance?

Discussion in 'Scripting' started by doodlinbee, Apr 10, 2021.

  1. doodlinbee

    doodlinbee

    Joined:
    Feb 15, 2020
    Posts:
    31
    I have done the following :

    - A bullet decal which is simply a quad mesh renderer
    - A bullet decal material which have GPU instancing enabled

    The problem is when I put like 2000 of these game objects into a wall, there's a performance issue when I look at them.

    I can see in the stats panel that rendering them increase of number of tris/verts by thousands...

    The bullet holes certainly won't move and are applied to static surface so is there a way to make them not cost anything to render them ?
     
  2. stain2319

    stain2319

    Joined:
    Mar 2, 2020
    Posts:
    417
    perhaps once the number of bullet holes reaches a certain number, can you replace the material/texture with a texture that has bullet holes pre-rendered onto it?
     
    Last edited: Apr 10, 2021
    Owen-Reynolds likes this.