Hi,
Are there any plans to add a diffusion profile property drawer or at least make the diffusion profile api public for people who don’t use shader graph or the hdrp shader GUI (for instance amplify shaders). We need to rely on custom solutions to make it work.
Thanks
Hello,
I guess you are talking about a material property drawer?
If that’s the case, it has already been added in HDRP 10 and above: https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/DiffusionProfileMaterialPropertyDrawer.cs
You can use it like this in a shader:
Shader "New Shader Graph"
{
Properties
{
[DiffusionProfile]_Profile("Diffusion Profile", Float) = 0
[HideInInspector]_Profile_Asset("Diffusion Profile", Vector) = (0, 0, 0, 0)
...
Note that you need to have two properties for the material drawer, the first needs to be a float and the second one a vector. For the naming, you can do what you want as long as the second variable name is the same as the first one with “_Asset” added at the end.
Hi. Awesome! I’m glad it was finally added. Will it be backported to older HDRP versions as well?
Unfortunately no, it was part of a bigger work task to allow to expose diffusion profiles in the ShaderGraph, and features are not backported on packages, only bugfix.
Alright, thanks for the info!
I’m glad I found this thread. How can I expose the parameters in my skin shaders directly?