Search Unity

Showcase modifying 4k textures at runtime on oldest android phones with burst in less than 5ms

Discussion in 'Burst' started by Ashkan_gc, Feb 27, 2021.

  1. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    We worked on a mobile game for a client and the game had a feature where you needed to change the color of a slime object and we used unity's standard shader and did not have any graphics programmers in house so we did not want to write a new standard shader (it was before we use URP and shader graph) and wanted to be able to write the code for changing colors fast and easily.

    We decided to give burst a try and convert the texture pixels to HSV color space and then change the color of the main and sometimes specular texture.

    We managed to do it fast enough (with the new texture access APIs and burst) that even on oldest phones on android you cannot find a spike
    This is the iOS version ‎Slime Games Simulator Goo Gang on the App Store (apple.com)

    We are working on the next version and actually the softbody and cloth physics that we use which is OBI softbody and OBI cloth has its new versions using burst instead of native code which they had before.

    Now thanks to burst they can release on other platforms which they did not directly support and they don't have to upgrade their code as much. Previously for example the physics crashed on iPhone x and other A12 chips and they created a patch and back-ported it to their older versions and before we find that out, we lost a week looking for the cause of the crash. Burst means all of that is mostly a story for the past.
     
    sheredom and Yury-Habets like this.