- Home /
 
 
               Question by 
               DevinDazzlr · Jul 25, 2014 at 12:13 PM · 
                texturemeshedge  
              
 
              Tile texture along edge of mesh
I want to create a 2D platformer where I want to generate the level from meshes instead of tiled sprites. I can create the mesh and fill it with a texture. What I am struggling with is a way to fill the edge of the mesh with another texture. I have tried to illustrate it here:

My take is that a shader is needed .. however, I am unsure how I detect the edge of the mesh and then sample texture #2 along the edges of the mesh.
Hope someone can help :)
 
                 
                concept.png 
                (34.6 kB) 
               
 
              
               Comment
              
 
               
              If noone knows how to program such a thing (i don't), you could have prefabs made with more meshes. One mesh with the texture on the terrain and a second strip like mesh on top that has the stones.
Your answer