Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Compress Vertex Data

Discussion in 'General Graphics' started by zhutianlun810, Apr 23, 2021.

  1. zhutianlun810

    zhutianlun810

    Joined:
    Sep 17, 2017
    Posts:
    162
    Hello,

    I am trying to mesh compression stuff to save memory. I compressed the pos from float32 to uint16, and then decompress them in the shader. I use VertexAttributeDescriptor to do this. My implementation works well on PC. However, when I run my test scene on my android device, the mesh disappears(seems like it is not rendered totally). I checked all adb error message and didn't find any clue.

    I did not use the Unity default vertex compression because it results bad precision when the mesh is large. In my solution I send the shader the mesh's bounding box info to guarantee precision.

    Have anyone did this kind of stuff before?
     
  2. schneckerstein

    schneckerstein

    Joined:
    Dec 6, 2018
    Posts:
    36
  3. zhutianlun810

    zhutianlun810

    Joined:
    Sep 17, 2017
    Posts:
    162

    Attached Files:

    Last edited: Apr 25, 2021