Author Topic: [SD 2019.2] GLSLFX shader, specify default value for guiWidget="color"?  (Read 92 times)

I am trying to pass an arbitrary color value to shader via GLSLFX (like material values), which I know can be done with something like:

Code: [Select]
<uniform name="_SomeColor" guiGroup="Light" guiName="Some Color" guiWidget="color" />
My question is whether "default" can be set for this type of value. I tried these:

Code: [Select]
default="(1.0, 0.5, 0.5, 1.0)"
Code: [Select]
default="(1.0, 0.5, 0.5)"
Code: [Select]
default="1.0, 0.5, 0.5, 1.0"
Code: [Select]
default="1.0, 0.5, 0.5"
None of them are valid, so I suspect this isn't supported yet.

Furthermore, I am not aware of a guiWidget for vector parameter, so can someone confirm they are not supported by GLSLFX?

Hi,

It looks like the default value in the glslfx file is completely ignored, in order to get a default value you have to set it in the fragment shader when declaring the uniform.
Also it looks like we only expose a vec3 widget without alpha..

I'll discuss that with the dev team.
Product Manager - Allegorithmic