Screen space Cosmic shader breakdown (Unity/ASE, Shaders/Textures included)

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.
image
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)
image

2. Add Fresnel effect.
So, our objects is now “blending” on the scene and making a single picture together.
image
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.
image
Here is final compare of regular and fresnel shader.
image
Ofcourse we can play with fresnel setup and color for different look.
image

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.
image
image

4. Particles.
Well let’s add some ParticleSystem. Simply create two stars textures, one for confetti and second for constellation effect.
image
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.
image
That’s all, Cosmic VFX is ready for use.

TWITTER
UnityPackage (Include all ASE Shaders,Textures,Materials and Example Scene)

17 Likes

Awesome stuff. Perfect timing because I’m wanting to do something similar with a vfx I’m working on.