Sky Clouds: Fluffy Cloud Shader for URP / HDRP / Built-In

Links: Asset | Manual

It’s a cloud shader based on Amplify for Unity 2022.3+ (no volumentric clouds).

Hope you like it :slight_smile:
If you have any questions regarding this asset please ask away!

UPDATE: There is now also a version for the Built-In RP and HDRP:
URP → KAMGAM
BiRP → Sky Clouds BuiltIn: Fluffy Cloud Shader for Amplify | Particles/Effects | Unity Asset Store
HDRP → Sky Clouds HDRP: Fluffy Cloud Shader for Amplify | Particles/Effects | Unity Asset Store

2 Likes

Looks great! What geometry are those cloud shape using (are they spheres)? And how does the camera react to being inisde the clouds: I saw a couple of moments inthe video where the screen goes fully cloud coloured but couldn’t see if it was workign fully other than that

Hi,
the geometry in the demos are mostly the default sphere + some other shapes for the big clouds (made with MudBun).

Since the clouds are not volmetric I built a system based on colliders / triggers that fades in and out a quad just in front of the camera near clipping plane to simulate cloud intersection. It’s all, as the saying goes “smoke and mirrors”, but it works suprisingly well.

1 Like

hi
asset looks good so far, looking forward to test it more (I was surprised that it uses tesselation instead of sdfs + raymarching /single raycast tbh but the mobile version with prebuilt meshes works well enough).

Have you considered doing the camera fade in the shader in camera space instead of triggers, colliders and the camera attached quad?

But I wanted to mention there is a scriptable object in the shaders folder which is missing it’s script called “SmootherStep”. I can already imagine what it does (custom amplify shader function?)
We can safely remove that or is it necessary / reperable in any way?

1 Like

Hi, good question.

Yes, it’s a custom shader functin for amplify which gives a bit of a smoother step than smooth step. It’s used in the Depth Fade.


You only need it if you plan to edit the shader with Amplify. I will have to check why the script connection is lost. Do you have Amplify installed? If not then this is normal. What Unity version are you on exactly?

I thought about adding the fade to the shader but kep it separate for two reasons: In my early tests it did not work as intended and it would be enabled all the time (performance hog) or it would require yet another shader variant, which I did not like.
But yes, ideally it would all be handled in the shader based on the actual displaced geometry (probably would be a two-pass solution, not sure). As of now I have no plans to add this but it’s on the backlog of things to investigate / revisit (no promises :wink:).

I am also contemplating making a ray marched version to compare performance and to have a version of the shader that is more flexible with intersections.

Thanks that is the information that I needed. Amplify Shader editor was not installed in that project (imported yours in a fresh, empty project for testing) but I do have it. It would be very helpful if unity would serialize the name of the referenced script too instead of just the guid. There was no way to figure out what was missing.

I’ve written quite a bit of raymarching cloud shaders already but more as a “one big quad in the sky / in front of the camera” scenario. I always contemplated doing something more geomtry based like yours ^^

1 Like

Is there a setting to increase transparency so that the skybox is partially visible through a cloud?

Hi, I am sorry but as of now there is no easy way to do that. What you can do it set the alpha of the base color but this will also show artefacts since it’s a single pass transparent shader. Looks like this (which I would consider very ugly but technically it’s transparent):


If you have Amplify Installer you could try playing around with the “Extra Pre Pass” to enable an extra depth pass. However, even with that you would pay for this with degraded performance since it then requires two render passes instead of just one.

In the HDRP version this would be possible by default and looks like this (though I am not sure if HDRP is an option for you, also it consts more performance):

Sorry that I don’t have better news. If I get the time to try the second depth pass I’ll post here again (no promises though).