offsetting vertices in vertex shader makes mesh disappear

pignapigna Posts: 20Member

I need a mesh that constantly scales and rotates according to some global constants, and I tought offloading the computation to a shader would be a great idea. Problem is that when the mesh bounding box gets out of screen the mesh stops being rendered, no matter if its transformed vertices are still on screen. In my case this is a pretty big problem since vertex displacement can get very big in the shader. How do I fix it?


  • xyzxyz Posts: 940Member
    edited January 14

    Meshes have custom_aabb property. Set its dimensions to nonzero values and it will be used in frustum culling instead of the default bounding box.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file