Page 1 of 1

Material Editor Support/Tweak

Posted: Wed Oct 04, 2017 7:35 pm
by mrchikita
Hello,

i'm trying to figure out a slight tweak i would like to do to the Line Patterns Material. Per default it has one color with a brightness adjust. I would like to be able to pick a second color and e.g. adjust the mix, opacity or only an overwrite so i could automate the line flashing between two different colors.

Does anybody have an idea how to tweak the original code?

Thanks.

Re: Material Editor Support/Tweak

Posted: Sat Oct 07, 2017 2:18 pm
by mad-matt
Duplicate this line in ISF header:
{ "LABEL": "Color/Front Color", "NAME": "front_color", "TYPE": "color", "DEFAULT": [ 1.0, 1.0, 1.0, 1.0 ] },
Change the label and name (and maybe default value) ie front_color2

Add you mixing uniform in the header
{ "LABEL": "Color/Mix", "NAME": "color_mix", "TYPE": "float", "DEFAULT": 0.0, "MIN": 0.0, "MAX": 1.0 },

At the place we use front_color in the shader code, replace with mix(front_color,front_color2,color_mix)
That's it !