Search Unity

Question How to "Bake" / "Merge" several triplanar materials into one ?

Discussion in 'General Graphics' started by Fransouski, Nov 8, 2022.

  1. Fransouski

    Fransouski

    Joined:
    Jan 14, 2019
    Posts:
    1
    Context :
    - My background decoration is made of a lot of gameobject cubes.
    - Each cube has a script attached to it in order to select the texture, rotate it, flip it. This affect the texture independently from the mesh (triplanar projection)

    Problem :
    → To optimize the game, since this is only a decoration, I want to merge all the cubes into one static mesh with one material


    (Currently, the MasterCubeMaterial script :
    - takes the original shadergraph material
    - creates a clone of it in order to tweak every cube's material value independently
    - Send the values of the specific cube to the shadergraph material)

    upload_2022-11-8_13-40-53.png