Do I have access to the sprite texture?

Crazy idea I have in mind: back in the Amiga days, where memory and speed where not a lot, I remember simulating a moving waterfall by shifting the pixel of my small 32x32 sprite.

The sprite sheet drawn was always the same, but I was basically writing directly on the texture and shifting pixels, and then refreshing the screen.

Do I have write access to the texture that Corona uses to display my sprite to do something similar? Can I modify it?

Thanks,

Gianmichele

You don’t have direct access to the textures, but we do support shaders which takes the texture and lets you apply some math using the GPU to it.  There are several shader posts in the Advanced Graphics forum.

See: https://forums.coronalabs.com/topic/56284-share-your-shaders/

https://forums.coronalabs.com/topic/55551-a-few-questions/

Rob

Thanks Rob,

I guess it’s not 1985 anymore and I need to definitely get into shaders :slight_smile:

You don’t have direct access to the textures, but we do support shaders which takes the texture and lets you apply some math using the GPU to it.  There are several shader posts in the Advanced Graphics forum.

See: https://forums.coronalabs.com/topic/56284-share-your-shaders/

https://forums.coronalabs.com/topic/55551-a-few-questions/

Rob

Thanks Rob,

I guess it’s not 1985 anymore and I need to definitely get into shaders :slight_smile: