Jump to content

HDRP ToD weather / snow cover support for PW_General_ShaderGraph_HDRP shader


Go to solution Solved by Josh,

Recommended Posts

Posted

Hello again!

 

I was reading an interesting post on Canopy, that suggested the PW shaders that respond to snow fall can be used on other materials, such as the roofs of buildings:

 

This sounds great, so I went to try it out. It looks like the HDRP shader, PW_General_ShaderGraph_HDRP, works great if I manually apply the progress slider as Peter mentioned in the post.

 

However, on activating the "snow" weather in HDRP ToD, it doesn't seem to integrate into the shader. So no "cover progress" during the snowy weather at all.

 

I wonder if I'm doing something wrong, or if this is something that hasn't been implemented yet?

 

Thoughts most welcome!

 

Regards,

 

Oli

Posted
On 9/9/2022 at 5:44 PM, mroshaw said:

Hello again!

 

I was reading an interesting post on Canopy, that suggested the PW shaders that respond to snow fall can be used on other materials, such as the roofs of buildings:

 

This sounds great, so I went to try it out. It looks like the HDRP shader, PW_General_ShaderGraph_HDRP, works great if I manually apply the progress slider as Peter mentioned in the post.

 

However, on activating the "snow" weather in HDRP ToD, it doesn't seem to integrate into the shader. So no "cover progress" during the snowy weather at all.

 

I wonder if I'm doing something wrong, or if this is something that hasn't been implemented yet?

 

Thoughts most welcome!

 

Regards,

 

Oli


Shader stuff for our old shader should be implimented although the hdrp version of our shader did not have the features supported so it may be that this has not yet been added to gaia and is why it's not working. Will have to check with a member of the team to confirm this is the case.

 

Josh

Posted

Hey Josh, 

 

The shader works, it just doesn't seem to be integrated with HDRP ToD.

 

So, I guess there's a possible enhancement to HDRP ToD that would lerp the cover parameter ("_PW_Cover") of the material shader ("PW_General_ShaderGraph_HDRP") over time, when Snow weather starts and stops. Something like:

 

public Material snowRoofMaterial;

 

private IEnumerator EnableRooftopSnowAsync()

{

   float timeElapsed;

   float startValue = 0.0f;

   float endValue = 1.0f;

   float snowRoofFadeTime = 5.0f;

   while (timeElapsed < snowRoofFadeTime)
   {
      currentValue = Mathf.Lerp(startValue, endValue, timeElapsed / snowRoofFadeTime);

      // Set the Procedural Worlds shader snow cover value
      snowRoofMaterial.SetFloat("_PW_Cover", currentValue);
      timeElapsed += Time.deltaTime;
      yield return null;
   }

}

  • Solution
Posted
On 9/14/2022 at 8:55 PM, mroshaw said:

Hey Josh, 

 

The shader works, it just doesn't seem to be integrated with HDRP ToD.

 

So, I guess there's a possible enhancement to HDRP ToD that would lerp the cover parameter ("_PW_Cover") of the material shader ("PW_General_ShaderGraph_HDRP") over time, when Snow weather starts and stops. Something like:

 

public Material snowRoofMaterial;

 

private IEnumerator EnableRooftopSnowAsync()

{

   float timeElapsed;

   float startValue = 0.0f;

   float endValue = 1.0f;

   float snowRoofFadeTime = 5.0f;

   while (timeElapsed < snowRoofFadeTime)
   {
      currentValue = Mathf.Lerp(startValue, endValue, timeElapsed / snowRoofFadeTime);

      // Set the Procedural Worlds shader snow cover value
      snowRoofMaterial.SetFloat("_PW_Cover", currentValue);
      timeElapsed += Time.deltaTime;
      yield return null;
   }

}

Hmm i don't remember seeing a _PW_Cover for shader in our stuff maybe this was added without me knowing. But yeah i can add it in to make sure it is also applying this value, i think this could be our 2nd cover layer in our shader.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...