Exemplo n.º 1
0
        internal override string GetPropertyBlockString()
        {
            string valueString = NodeUtils.FloatToShaderValueShaderLabSafe(value);

            switch (floatType)
            {
            case FloatType.Slider:
                return($"{hideTagString}{referenceName}(\"{displayName}\", Range({NodeUtils.FloatToShaderValue(m_RangeValues.x)}, {NodeUtils.FloatToShaderValue(m_RangeValues.y)})) = {valueString}");

            case FloatType.Integer:
                return($"{hideTagString}{referenceName}(\"{displayName}\", Int) = {valueString}");

            case FloatType.Enum:
                return($"{hideTagString}{enumTagString}{referenceName}(\"{displayName}\", Float) = {valueString}");

            default:
                return($"{hideTagString}{referenceName}(\"{displayName}\", Float) = {valueString}");
            }
        }
Exemplo n.º 2
0
 internal override string GetPropertyBlockString()
 {
     return($"{hideTagString}{referenceName}(\"{displayName}\", Vector) = ({NodeUtils.FloatToShaderValueShaderLabSafe(value.x)}, {NodeUtils.FloatToShaderValueShaderLabSafe(value.y)}, {NodeUtils.FloatToShaderValueShaderLabSafe(value.z)}, {NodeUtils.FloatToShaderValueShaderLabSafe(value.w)})");
 }
Exemplo n.º 3
0
 internal override string GetPropertyBlockString()
 {
     return($"{hideTagString}{hdrTagString}{mainColorString}{referenceName}(\"{displayName}\", Color) = ({NodeUtils.FloatToShaderValueShaderLabSafe(value.r)}, {NodeUtils.FloatToShaderValueShaderLabSafe(value.g)}, {NodeUtils.FloatToShaderValueShaderLabSafe(value.b)}, {NodeUtils.FloatToShaderValueShaderLabSafe(value.a)})");
 }