hydroxy
Member
I'm looking for some help creating a neon sprite shader. I've got a solid understanding of how to generate neon sprites but I'm pretty much looking to automate the process with a shader and need help with the shader coding.
The basic process is first of all the shader will surround a sprite (A) with a glow of decreasing opacity (B) and then draw a white outline (C) of the sprite to be applied on top of the original. This can be seen in the image below (B+C=D)
I think this could perhaps be automated by getting a shader to do all the work. The shader could find all empty pixels adjacent to the non-empty pixels and give them the color of said adjacent pixels with some decreased opacity also. Repeat this process perhaps about 5-10 times and you will have a nice decreasing glow around the sprite. Finally add a white version of the original sprite on top of the completed image and thats that.
I've mocked up the above examples using the glow function in GMS v1.4. Although I'd imagine a shader based version would have the same effect.
Automating this would save me so much time in my current project and the GameMaker community would have a cool neon shader to make retro games and such with.
What do you think? Can anyone help make something like this? I've tried this introduction to shaders video but still the complexities of that new language make this task too difficult for me right now. Any help at all would be appreciated.
Thanks for reading
I think this could perhaps be automated by getting a shader to do all the work. The shader could find all empty pixels adjacent to the non-empty pixels and give them the color of said adjacent pixels with some decreased opacity also. Repeat this process perhaps about 5-10 times and you will have a nice decreasing glow around the sprite. Finally add a white version of the original sprite on top of the completed image and thats that.
I've mocked up the above examples using the glow function in GMS v1.4. Although I'd imagine a shader based version would have the same effect.
Automating this would save me so much time in my current project and the GameMaker community would have a cool neon shader to make retro games and such with.
What do you think? Can anyone help make something like this? I've tried this introduction to shaders video but still the complexities of that new language make this task too difficult for me right now. Any help at all would be appreciated.
Thanks for reading
Last edited: