Show HDR Color in Custom Material Inspector

Hi there,

I’ve made my own custom material inspector one of my shaders.
I have an Emission Color parameter and I want the material editor to show it as an HDR color. But I don’t know how to show it as one.

My function in code looks like this…
7497320--923393--upload_2021-9-15_13-29-12.png
and it looks like this in the inspector.

7497320--923396--upload_2021-9-15_13-29-38.png

How do I make Emission Color act like this…
7497320--923399--upload_2021-9-15_13-29-59.png

I can see that it can sort of be done by using…

_materialEditor.TexturePropertyWithHDRColor()

But…I don’t want a texture input! So this doesn’t work.

Thanks,

  • Rich

Hi!
You need to put an [HDR] property prefix in the .shader file.
Like this: [HDR] _EmissionColor("Color", Color) = (0,0,0)

1 Like