Search Unity

Question Object Scale node for static objects?

Discussion in 'Shader Graph' started by dgoyette, Jun 26, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    I'm using a pretty simple approach to making a tilable material--just create a tiling node based on the Object Scale of the object:

    upload_2019-6-26_13-49-49.png

    This works fine for dynamic objects, but I found that anything marked as Batching Static doesn't do the tiling. My assumption is that this is because of the optimization where the mesh is combined with other meshes.

    I can turn off Batching Static for these objects, and I guess that seems like the most sensible approach. But I wondered if there was something else I could do for this approach to work on Batching Static objects?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,343
    Correct. Once combined the "object" is the entire static mesh, which is unscaled.

    World space triplanar mapping.
     
    dgoyette likes this.