# Sprite frame material example

**URL:** <https://forum.defold.com/t/sprite-frame-material-example/83192>\
**Category:** The Defoldmine\
**Created:** [September 1, 2026, 3:22am UTC](https://forum.defold.com/t/sprite-frame-material-example/83192 "2026-09-01T03:22:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boruok](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/boruok/32/21851_2.png) [@boruok](https://forum.defold.com/u/boruok)\
**Post date:** [September 1, 2026, 3:22am UTC](https://forum.defold.com/t/sprite-frame-material-example/83192/1 "2026-09-01T03:22:06Z")

</div>

Tried to find shader that draws portion of texture (aligned with grid), didn’t find it so i wrote my own. Code is adapted from owesome sprite-repeat shader written by @Dragosha

 ![texture](https://forum-defold-uploads.b-cdn.net/original/3X/1/7/17db5b030e8f1ff25b75fc0a39e3bc463f55b5e9.png)

[defold-frame-material.zip](https://forum.defold.com/uploads/short-url/hOv7POoAh0wsFhEIS58Jx9y7Okg.zip) (1.5 MB)
