Page 1 of 1

Add empty space between tiled texture

PostPosted: Fri Jun 29, 2018 4:36 pm
by chappie
Hi i have a 2d texture, i have it set to tiled, and i animate it using UV offset. I want to add extra empty space on the x axis between each tile. Is there a way to do this? The reason i am not using a fixed texture with that spacing is because i want to adjust the tile space amount within the game.

I have attached the shader overview, and what i am trying to achieve. Any help appreciated.

Shader:
ShaderOverview.png
ShaderOverview.png (248 KiB) Viewed 1492 times


Sprite Texture
SpriteTexture.png
SpriteTexture.png (4.33 KiB) Viewed 1492 times


Desired Result
DesiredResult.png
DesiredResult.png (9.34 KiB) Viewed 1492 times

Re: Add empty space between tiled texture

PostPosted: Sat Jun 30, 2018 5:21 pm
by Ricardo Teixeira
Hello,

Depends on how you intend to use it but I recommend examining the Improved Read From Atlas sample as a starting point.

Image

Thanks!

Re: Add empty space between tiled texture

PostPosted: Mon Jul 02, 2018 10:54 am
by Ricardo Teixeira
Don't forget to set your texture to clamp ;)