- Home /
Using a single element(texture) of a sprite sheet in shader?
Hello. Nice to meet you all. My question is pretty straight forward, I hope. I have an image that I've sliced into 12(64x64) sprites, using the sprite editor. I can use these just fine as regular sprites. My problem is, each sprite is an in-game special ability, and I want to use them in shaders, as exclusive textures. When I try to get the texture from a slice, it returns the whole texture, not just the slice I'm asking for. Is this a known behavior? I could just hack some texture coordinates in to make it work, but that really defeats the purpose. I've already isolated the one I need at any given time, and used GetPixels(), etc... I'm afraid that will just add back in the performance hit I'm trying to avoid in the first place. Thanks for any help.