Now the animation is managed by “animating” tint in each sprite shader using a delay.
Doing the same thing in the tilemap shader is possible, but it is hadred to code for me
I’ve poor skill with shaders
I’ll try!!!
I’m tring to implement the “blocks lighting” effect in the tilemap shader.
I see tilemap material have only sampler and tint uniform parameters.
It will be useful to have uniform parameter with tile index (x,y) and layer index in fragment and vertex shaders. A vec4 can hold all informations!
Without layer index I’ll have to split each tilemap into 2 different tilemaps, but I’ve already designed 30 levels …
Tile index is useful because now I can calculate it in the vertex shader from position, but the only way to forward it to fragment, is with varying, so it has to be clamped. (flat out variables seems to work only with GLES30)
@Mathias_Westerdahl is there any way to add these uniform in the material or need an engine change?