- Home /
How would I make a shader that gives this appearance?
I would like to be able to place objects with a material that gives the appearance of these neurons. I believe I'll have to apply some bloom and other effects to get it to look like this image.
As to my current thinking, I'm thinking the shader would need to be something that gives a white appearance with a blue outline. But my shader-foo is weak.
I'm not asking for someone to write it for me, Just some direction to go in on how to get this appearance. I'm thinking I might even purchase Shader Forge for this but thats a tool not a solution.
If that is the output you want, what exactly does the underlying scene look like? What objects are being rendered? Are they sprites, 3d models?
What I mean is that you could get an output exactly like that image using the simplest of unlit shaders on a quad with that texture applied, but I'm guessing that's not what you meant...
Thanks tanoshimi for responding. Yes you are right, I should supply more information. We are attempting to create a 3D representation of a neural network in real-time. So each neuron needs to be a 3D object in the scene. Connections between neurons will be 3D objects as well. At this point though I think the only part I need some pointers on is how to get a bunch of 3D models to look like that.
So, assu$$anonymous$$g that your 3d meshes model all the wiggly lines/lightning shape already (i.e the only thing you want to know is the colour blending), that looks just like additive blending of partially transparent blue objects: i.e. a shader with blendmode set to Blend SrcAlpha One
.
Would I be setting _SrcBlend or_DstBlend to SrcAlphaOne? Ultimately it seems like I need more education on the topic. Is there a relevant source I con go to?
Src is Alpha, Dst is One. So you take everything that's already been written to the framebuffer, and add on the fragment currently being rendered based on its alpha - that's what causes the bloom effects, because once several objects are stacked on top of each other their RGB will sum to > 255.
You might want to read http://en.wikibooks.org/wiki/Cg_Program$$anonymous$$g/Unity/Order-Independent_Transparency (or, in fact, the whole of that wikibook)
Your answer
Follow this Question
Related Questions
Gl.Lines appearing over objects 0 Answers
How can I edit Material Textures without creating a new Shader?,How to edit Material Texture 1 Answer
It is possible to clone and modify one of the existing shaders 0 Answers
Any idea on how to do a FallOff Shader...? 0 Answers
Shader: get back scene pixel color? 1 Answer