On this page I'll list some of the most interesting shaders I've developed over the years in diferent environments.
The request was that because of the narrative those crystals have a soul trapped inside of them. The gems needed to feel full of power and have the soul move inside.
The cool side of the effect is that this is no complicated Subsurface scattering or something like that, a simple fresnel effect on the emissive and a bit of trickery to make it move around in 3d.
Those are the same gems as in the post above but raw, before being extracted.
I wanted to make them similar so the player could associate the two objects but different enough.
To do so this is the same effect but with the moving fresnel stationary and instead of the classical "sphere" shape that the effect gives, I had to deform it to stretch along the Y-axis of the gem and make it shine more when you are perpendicular to it.
**The light blue ones are my shader and the plain white ones the stock texturing on them.**
This is an effect I showcased for a portal in aragami. The idea is that with my shader the player was able to see the other side of the portal as if it was a true 3D portal.
To do this I wrote a small script that allowed me to render a cube map from any position and then feed this into the shader and project it on the outsides of a sphere with its normals fliped so that it seems that you are looking into it
This is one of my favorite shaders, it's based on the same principle as the subsurface scattering you can read about on the Vegetation Engine sub-page on this site.
The cool thing is that this shader is inside my own custom render pipeline, you can also read about it on its sub-page, this integration with a custom renderer lets me filter the light I calculate and add an "inside color", this way, as you can see in the video, the light is white but the light coming off the other side of the Ice is tinted with the blue color of the insides. To make the effect more clear there is one sphere with white as the inside color and it stands out a lot.
Also, notice you can see shadows trhough the ice!
For my TFG the artists wanted to have sunshafts but needed full control over them, also the game is supposed to run on low-end devices so we could not afford expensive effects.
What I did was randomize a pattern to make the light "strings" and then project them on the insides of a flipped cylinder, this way you always see them and it looks like they are changing and moving depending on the angle. Also to make the rays softer I sample the depth texture to fade the effect whenever they come close to a surface, if I didn't do that you could see the seam line between the cylinders and the floor.
This is a regular hight blending shader i had to write for the artists on my TFG, the hard part of this shader is that its integrated on my render pipeline so i had to give support for polybrush, a asset on the unity store.
For the TFG we needed a way to make the emissive of a material fade in and out but in a non-directional way, as you can see in the video, in the same material the emissive is fading in and out on the Y-axis but also rotating on the up-right corner.
To do this the artists had to paint a gradient that represented the path the emission would follow, and then I just fade depending on the time.
This is a regular triplanar for my TFG.
Sebastian Lague has an awesome video on how to render volumetric clouds that inspired me to adapt the system to consume fewer resources, as you can see the clouds aren't ass detailed but the compute shader has to do way less work which speeds up rendering in the case that you need the 3D texture to be realtime.
This is the energy generator shader for my TFG, the narrative of the game talks about a civilization that learned to control gravity and has some awesome generators that activate and deactivate gravity.
I wanted to resemble a black hole but have it feel more energetic and less dead so I combined several effects to get this shader.
This is a post-processing effect! I was experimenting with how far can you go with post-processing after doing the volumetric clouds.
This effect consists of a raytraced box that distorts the direction of the rays and makes them sample from a different place of the final image. To top of the effect I added normal map support.
After seeing Andy Saia awesome GDC talk "Bleeding-Edge Effects on Mobile" I got inspired to try and implement the technique he explains for simulating soft bodies. Here I leave a video with the result.
Once again SSS comes to save the day, this effect also is based on the subsurface scattering I already talked about, but only for the lighting, on top of that I sample from the depth texture to draw the silhouette of what is behind the paper panel, for gameplay reasons, the player needs to be able to see a bit through these walls and this is how I achieved the effect.
This effect is the one that gave me more headaches though, first of all, because the SS and see-through effect only could happen on the paper side of the texture and not all over so I had to mask it, and also because of the depth effect the paper panel itself had to be transparent so tunning it to not be drawn below or over fogs and all sort of effects was really hard.