You copied the Doc URL to your clipboard.

3.5.1. Setting up a shader to use animation

A shader is animated using a key framing method. Values are set for the initial frame and final frame, the Shader Development Studio then interpolates the values between these two frames to create the animation effect.

The Environment Mapping shader demo provided in the content directory is set up to use animation. To view how animation has been setup for this shader:

  1. Open the project that you created containing the Example content provided with the Shader Development Studio software. See Importing existing Shader effects and configurations.

  2. In the Shader Control view, select ExampleContent → Demo 07 - Environment Mapping.

    The Shader Preview is updated to show a custom geometry called ARM, with environment mapping applied. See Figure 3.23:

    Figure 3.23. ARM geometry

    ARM geometry

  3. The Shader Control view and the Shader Uniforms view set up the key framing parameters for the shader animation.

    In the Camera control group box in the Shader Control view, values are set for:

    • camera position for the first frame, this is also the camera position used to render single-frame shaders

    • camera position of the last frame and the number of frames to render. See Figure 3.24:

    Figure 3.24. Shader Control view

    Shader Control view

    In the Shader Uniforms view, initial values and final values are set for each uniform listed. These are the values that are interpolated to make the animation. See Figure 3.25:

    Figure 3.25. Shader Uniforms view

    Shader Uniforms view

Was this page helpful? Yes No