|
spritesheet glsl / iterator demoI've had the idea of manipulating gl color of render patches that are inside of a GLSL shader to create texture offsets since a discussion about this a long time back on the qc developer list. This morning I was kind of curious to try hooking up a sprite sheet to the same kind of setup, offsetting y as well as x, and iterating a bunch of sprites inside. It works. I didn't take the time to get a sprite sheet where stuff is spaced correctly or fine tune the x/y offsets, so you'll see some icons cut off/lapping onto other sprites. That's why it's here in the Woodshed. I think it's a neat thing for people to be aware is possible though, so here it is. This would probably be a sweet way to approach certain things. You'll likely be limited by resolution of color steps, so tread lightly and test well. |