Exemple #1
0
        public override void LerpTo(Material targetMat, ShaderProperty_Base to_, float normalized)
        {
            ShaderProperty_Shell shell = (ShaderProperty_Shell)to_;

            targetMat.SetFloat("_ShellNormalDisplacment", Mathf.Lerp(this._ShellNormalDisplacment, shell._ShellNormalDisplacment, normalized));
            targetMat.SetColor("_ShellColor", Color.Lerp(this._ShellColor, shell._ShellColor, normalized));
            targetMat.SetFloat("_ShellEmission", Mathf.Lerp(this._ShellEmission, shell._ShellEmission, normalized));
            targetMat.SetTextureScale("_ShellTex", Vector2.Lerp(this.Tiling, shell.Tiling, normalized));
        }
Exemple #2
0
        public override void LerpTo(MaterialColorModifier.Multiplier multiplier, ShaderProperty_Base to_, float normalized)
        {
            ShaderProperty_ColorBias bias = (ShaderProperty_ColorBias)to_;

            if (multiplier != null)
            {
                multiplier.mulColor = Color.Lerp(this.BiasColor, bias.BiasColor, normalized);
            }
        }
Exemple #3
0
        public override void LerpTo(Material targetMat, ShaderProperty_Base to_, float normalized)
        {
            ShaderProperty_Rim rim = (ShaderProperty_Rim)to_;

            targetMat.SetColor("_RGColor", Color.Lerp(this._RGColor, rim._RGColor, normalized));
            targetMat.SetFloat("_RGShininess", Mathf.Lerp(this._RGShininess, rim._RGShininess, normalized));
            targetMat.SetFloat("_RGScale", Mathf.Lerp(this._RGScale, rim._RGScale, normalized));
            targetMat.SetFloat("_RGBias", Mathf.Lerp(this._RGBias, rim._RGBias, normalized));
            targetMat.SetFloat("_RGRatio", Mathf.Lerp(this._RGRatio, rim._RGRatio, normalized));
            targetMat.SetFloat("_RGBloomFactor", Mathf.Lerp(this._RGBloomFactor, rim._RGBloomFactor, normalized));
        }
        public override void LerpTo(Material targetMat, ShaderProperty_Base to_, float normalized)
        {
            ShaderProperty_Distortion distortion = (ShaderProperty_Distortion)to_;

            targetMat.SetFloat("_DTIntensity", Mathf.Lerp(this._DTIntensity, distortion._DTIntensity, normalized));
            targetMat.SetFloat("_DTPlaySpeed", Mathf.Lerp(this._DTPlaySpeed, distortion._DTPlaySpeed, normalized));
            targetMat.SetFloat("_DTNormalDisplacment", Mathf.Lerp(this._DTNormalDisplacment, distortion._DTNormalDisplacment, normalized));
            targetMat.SetFloat("_DTUVScaleInX", Mathf.Lerp(this._DTUVScaleInX, distortion._DTUVScaleInX, normalized));
            targetMat.SetFloat("_DTUVScaleInY", Mathf.Lerp(this._DTUVScaleInY, distortion._DTUVScaleInY, normalized));
            targetMat.SetVector("_DTFresnel", Vector4.Lerp(this._DTFresnel, distortion._DTFresnel, normalized));
        }
Exemple #5
0
        public override void LerpTo(Material targetMat, ShaderProperty_Base to_, float normalized)
        {
            ShaderProperty_SpecialState state = (ShaderProperty_SpecialState)to_;

            targetMat.SetFloat("_SPNoiseScaler", Mathf.Lerp(this._SPNoiseScaler, state._SPNoiseScaler, normalized));
            targetMat.SetFloat("_SPIntensity", Mathf.Lerp(this._SPIntensity, state._SPIntensity, normalized));
            targetMat.SetFloat("_SPTransition", Mathf.Lerp(this._SPTransition, state._SPTransition, normalized));
            targetMat.SetColor("_SPTransitionColor", Color.Lerp(this._SPTransitionColor, state._SPTransitionColor, normalized));
            targetMat.SetColor("_SPOutlineColor", Color.Lerp(this._SPOutlineColor, state._SPOutlineColor, normalized));
            targetMat.SetFloat("_SPTransitionEmissionScaler", Mathf.Lerp(this._SPTransitionEmissionScaler, state._SPTransitionEmissionScaler, normalized));
            targetMat.SetFloat("_SPTransitionBloomFactor", Mathf.Lerp(this._SPTransitionBloomFactor, state._SPTransitionBloomFactor, normalized));
        }
Exemple #6
0
        public override void LerpTo(Material targetMat, ShaderProperty_Base to_, float normalized)
        {
            ShaderProperty_ColorBias bias = (ShaderProperty_ColorBias)to_;
            Color color = this._originalColor * Color.Lerp(this.BiasColor, bias.BiasColor, normalized);

            if (targetMat.HasProperty("_MainColor"))
            {
                targetMat.SetColor("_MainColor", color);
            }
            else
            {
                targetMat.color = color;
            }
        }
Exemple #7
0
 public abstract void LerpTo(Material targetMat, ShaderProperty_Base to, float normalized);
Exemple #8
0
 public virtual void LerpTo(MaterialColorModifier.Multiplier multiplier, ShaderProperty_Base to_, float normalized)
 {
 }