Author Topic: How to apply Custom Shader on a block with different textures for each side  (Read 105 times)

mkk5725

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hello,

For a block that has one texture on each side, we can just apply one shader and it will work for the entire block. However, for a block with multiple textures, it won't work since to apply a material, we have to feed in a texture, and then because of that, the shader will get applied but will also override one texture on all faces.

What we want is just the shader effect but we also want each side to have its own texture.

Will making a custom cube prefab work or can you suggest any alternatives? :'( . Thank you.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7262
    • View Profile
Hi,

One option would involve a texture atlas which contains the 6 textures and a mesh with the corresponding mapped uvs. Then you can use the same shader over the 6 textures.
The cube creation tool can be useful here: https://kronnect.freshdesk.com/en/support/solutions/articles/42000038971-cube-creation-tool

Regards