Now I’m looking for a way to add glowing effect to the border of it in stead of a boring static setting_selected.png image.
(for example: the light-blue glowing border of the menu image here , check at 1:00https://youtu.be/PJSlvhDbB4I?t=1m).
Your attention and help is very much appreciated
I’m lost and really need a solution for this. If you don’t have time to guide me step by step, please leave a keyword so that I know where to start with. Thanks a lot.
Do you mean I have to custom the shader in engine? If so, is there any specific tutorial showing how to do similar task out there? Most of them just show me how to use the engine not custom it.
I have another idea that using a sprite with square shape, which exactly fits the menu item to make it looks like the border of it. Then make it animate (changing color) to show glowing effects likes how they do in the video. Is that possible and easier to do the job?
My repo is sort of half-baked in the sense that I never went back and cleaned things up and I think one or two of the original ObjC cocos2d-iPhone examples are not ported yet.
ExampleBase shows how the shaders are attached, uniforms updated, and how to create GLProgramState from shader files.
And as Boby mentions, there are other examples in cpp-tests project that comes with the engine zip/source.
Hi @b12345, thanks for your attached fragment shader. However, It’s a little hard to understand for me since variables’s name don’t self-explain much. It would be great if you could explain to me what do these variables do ? :
u_ctime; u_gtime; u_radius; u_color; accum;
and CC_Texture0 (I can’t find definition of this, what is this for? )
Here is the fragment shader in your glowshader.zip:
(personal note to @slackmoehrle: I wish the forum didn’t embed links to other topics without providing a link to open the referenced forum. It’s one of the two reasons I add a " ." to the end of all my links. The other reason is when there’s multiple links embeds can get a bit unwieldy :D)