Пример #1
0
        public bool GetInput(int _input, out TextureParam _out)
        {
            _out = null;

            if (Inputs == null || _input >= Inputs.Count)
            {
                Debug.LogError("not enough inputs for " + this);
                return(false);
            }


            if (Inputs[_input].connection != null)
            {
                _out = Inputs[_input].connection.GetValue <TextureParam>();
            }
            else
            {
                _out = TextureParam.GetWhite();
            }

            return(true);
        }
Пример #2
0
        public bool GetInput(int _input, out TextureParam _out)
        {
            _out = null;

            if (Inputs == null || _input >= Inputs.Count)
            {
                Debug.LogError("not enough inputs for " + this);
                return(false);
            }


            if (Inputs[_input].connection != null)
            {
                _out = Inputs[_input].connection.GetValue <TextureParam>();
            }
            else
            {
                _out = TextureParam.GetWhite();
            }

            if (m_ClampInputUV)
            {
                if (_out.m_Destination)
                {
                    _out.m_Destination.wrapMode = TextureWrapMode.Clamp;
                }
            }
            else
            {
                if (_out.m_Destination)
                {
                    _out.m_Destination.wrapMode = TextureWrapMode.Repeat;
                }
            }

            return(true);
        }