Forum Libraries, Components, and Plugins

UrhoSharp.SharpReality 1.9.67 ... SetShaderParameterAnimation sample code search

Updated to this latest release and give it a thumbs up. No problems found so far.

I'm using this on UWP Win 10 platform with Hololens.

Good job @EgorBo

As an aside, anyone have any example/sample code for SetShaderParameterAnimation rather than using the Update?



  • utekaiutekai USMember ✭✭✭

    Here's a bit of sample code I found:
    ValueAnimation specColorAnimation=new ValueAnimation();

            specColorAnimation.SetKeyFrame(0.0f, new Color(0.1f, 0.1f, 0.1f, 16.0f));
            specColorAnimation.SetKeyFrame(1.0f, new Color(1.0f, 0.0f, 0.0f, 2.0f));
            specColorAnimation.SetKeyFrame(2.0f, new Color(1.0f, 1.0f, 0.0f, 2.0f));
            specColorAnimation.SetKeyFrame(3.0f, new Color(0.1f, 0.1f, 0.1f, 16.0f));
            // Optionally associate material with scene to make sure shader parameter animation respects scene time scale
            mushroomMat.SetShaderParameterAnimation("MatSpecColor", specColorAnimation, WrapMode.Loop, 1.0f);

    It shows that a ValueAnimation object is passed into the SetShaderParameterAnimation .

Sign In or Register to comment.