Hello, let’s breakdown Screen Space shader with Space theme. Best reference is Path of Exile as “Shaper” map effect.
I recommend to learn this shader for VFX newcomers, because it’s very simple technique and require no pro competition with shader editors.
Also i will attach full UnityPackage which include all shaders and textures, as well example scene.
Here Unlit Cosmic Shader screen
1. Single shader (material) on the object.
A single material will cover all entire mesh making him looks like a space apparition or smth.
The key is using [Screen Position] node and [Add] two different textures.
Textures is most important thing here, so we will need really good quality of those to make this effect tasty.
First texture will be background (Space) and second one is front (Stars). We will also offset textures by using [Time] node. (Make sure your textures are seamless)
2. Add Fresnel effect.
So, our objects is now “blending” on the scene and making a single picture together.
But what if we want highlight each as a separate object on the scene? Let’s add [Fresnel] to our regular process, it’s very easy and cheap.
Use two [color nodes], [noise tex] and [time] offset for [fresnel], this will add “Volume” effect. Also, we will set [UV coord.] instead of [Scene Position] for [Fresnel] so now we can track our Robot Kyles as different objects.
Here is final compare of regular and fresnel shader.
Ofcourse we can play with fresnel setup and color for different look.
3. Two materials. Mask texture.
Opacity is very friendly, we can mask our main material to achiev nice gradients or fade effects.
Set two materials for mesh, one is Cosmic, second is Base material (Base color for Robot Kyle).
Add [Opacity Mask] texture (or w/e you want) to master node.
Now it’s only up to your fantasy, make shapes, double mask, distort UV or w/e you can handle.
Well let’s add some ParticleSystem. Simply create two stars textures, one for confetti and second for constellation effect.
Now setup particles, if you are using characters (or weapons/doodles/any other mesh) set [shape] in ParticleSystem to MeshRenderer mode (or SkinnedMeshRenderer depends on your mesh).
First prefab is Confetti, this will release many stars and second one is constellation (trail ribbon) which will draw some lines between static stars.
That’s all, Cosmic VFX is ready for use.