Material Editor Support/Tweak
  • mrchikita
    junior Member
    Posts: 1
    Joined: Wed Oct 04, 2017 7:31 pm

    Material Editor Support/Tweak

    by mrchikita » Wed Oct 04, 2017 7:35 pm

    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.
  • mad-matt
    garageCube team
    Posts: 1475
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Material Editor Support/Tweak

    by mad-matt » Sat Oct 07, 2017 2:18 pm

    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 !

Who is online

Users browsing this forum: No registered users and 16 guests