title: Unity3d: How to stretch (or share) a shader across multiple objects
body: <p>I am tinkering around with cubes trying to build variations of 'block types' (in an effort to get more familiar with Unity's abilities, shaders, editor tools etc).</p>
  <p>I have a generic cube:</p>
  <p><a href="https://i.stack.imgur.com/MszIq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MszIq.png" alt="enter image description here" /></a></p>
  <p>That I want to add a material/shader.. which I have done (no problem there):</p>
  <p><a href="https://i.stack.imgur.com/KWwLy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KWwLy.png" alt="enter image description here" /></a></p>
  <p>Which looks well enough (for my purposes) when it's just one block, but when I stick them altogether, I don't like the effect; you can see the individual boxes and the shader (which you can't see in the still image) is actually animated water, so when it's animating it looks ... pretty ugly.</p>
  <p>(Bad/undesired)
  <a href="https://i.stack.imgur.com/AztZp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AztZp.png" alt="enter image description here" /></a></p>
  <p>I am trying to STRETCH or share the shader/material across all the selected blocks. See the below example (in this case, I have taken a SINGLE block and stretched it, but that's not keeping with the spirit of having individual blocks, so also not what I want).</p>
  <p>(better/more desired)</p>
  <p><a href="https://i.stack.imgur.com/Zb8jc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zb8jc.png" alt="enter image description here" /></a></p>
  <p><strong>I have thought the following may help, but they all seem overly complicated (aka I think I'm going about it incorrectly)</strong></p>
  <ol>
  <li>Have the individual blocks, but stretch a single plane across them and then apply the material.</li>
  <li>I have found examples of programmatically joining meshes, and then apply the material/shader to the single object.</li>
  <li>Take a single block and stretch it to the dimensions needed.</li>
  <li>Maybe (not sure if I can), but have a plane with the water material applied to it and use the blocks as masks to only display water for those blocks?  Not sure how that works...</li>
  </ol>
  <p>In the end I am hoping to have the following:</p>
  <ol>
  <li>Individual blocks (so I can interact with them.</li>
  <li>Shader animations/colors are shared across the shared/connected blocks.</li>
  <li>It won't always be a 2x3 grid... it could be diagonal, or contain odd shapes of connected blocks...</li>
  </ol>
  <p>(this is all in EDITOR mode).</p>
  <p>Any thoughts on how I might approach this?</p>