I working on slider gradient visual for osu!droid and came up but a couple of issues due to the old Engine:
In ES1 there's no near existence of shaders programs which are the base of the gradient effect, to approach the effect in modern versions a fragment shader for color interpolated by position is needed.
Following the point above ES1 requires both vertex and color buffers by separate which means more memory usage under the hood for just a single slider.
There's 2 solutions I found for these:
Use textures and texture coordinates which can lead in another issues, for example transparency effects must be applied through a layer due that we're working with a texture and not an absolute color unless we generate the texture dynamically at certain time (of course punishes performance).
Update to ES2 and use color per vertex solution. For this we can update AndEngine to "GLES2" branch, both versions are similar despite some minor changes that would require certain effort.
I've the algorithm to convert the slider path into vertices for both versions:
In ES1 it uses a separated color buffer but as expected it doesn't work properly, the only way to do gradient on ES1 is by using a texture and a texture coordinates buffer.
In ES2 it uses a single buffer for both vertices and the color as well a fragment shader to do the trick which comes natively with AndEngine in this case. (This has been tested)
I intend to propose an upgrade of the engine to GLES 2, but not for this release. We already planned some things to work on, so it will have to hold for a while.
I working on slider gradient visual for osu!droid and came up but a couple of issues due to the old Engine:
In ES1 there's no near existence of shaders programs which are the base of the gradient effect, to approach the effect in modern versions a fragment shader for color interpolated by position is needed.
Following the point above ES1 requires both vertex and color buffers by separate which means more memory usage under the hood for just a single slider.
There's 2 solutions I found for these:
Use textures and texture coordinates which can lead in another issues, for example transparency effects must be applied through a layer due that we're working with a texture and not an absolute color unless we generate the texture dynamically at certain time (of course punishes performance).
Update to ES2 and use color per vertex solution. For this we can update AndEngine to "GLES2" branch, both versions are similar despite some minor changes that would require certain effort.
I've the algorithm to convert the slider path into vertices for both versions:
In ES1 it uses a separated color buffer but as expected it doesn't work properly, the only way to do gradient on ES1 is by using a texture and a texture coordinates buffer.
In ES2 it uses a single buffer for both vertices and the color as well a fragment shader to do the trick which comes natively with AndEngine in this case. (This has been tested)
I hear suggestions.