Search Results for

    Show / Hide Table of Contents

    Shaders

    alt_text

    AVPro Video includes a number of shaders, most of which are used internally, but in some cases the user is required to use the appropriate shader.

    Canvas Display

    When displaying video on the Canvas via the DisplayUGUI component you don't have to worry about the shader being used. Internally this component will select the best AVPro Video shader to use.

    Mesh Display

    When using the ApplyToMesh or ApplyToMaterial component, you should make sure that the material uses one of the AVPro Video shaders. This is because the textures produced by the plugin need transforming to be displayed correctly (eg gamma adjustments, stereo resolving, alpha packing, vertical flipping on some platforms etc). Our shaders handle all of this automatically and without an extra resolve step which would add overhead.

    Note

    In the near future we plan to add a "Resolve" feature which will resolve the textures to a RenderTexture so that our shaders won't be required. This will be very useful for many cases, but it will be a small performance penalty due to the extra resolve step.

    Unlit Shaders

    For cases where lighting isn't needed:

    • Unlit
      • Supports: Stereo, colour tint, fog
      • Unsupported: Lighting, transparency
    • Unlit-Transparent
      • Supports: Stereo, colour tint, fog, transparency
      • Unsupported: Lighting
    • Unlit-AndroidOES
      • Android OES mode only (it will fall back to the Unlit shader on non-Android platforms)
      • Supports: Stereo, colour tint
      • Unsupported: Lighting, transparency
    • Unlit-Transparent-AndroidOES
      • Android OES mode only (it will fall back to the Unlit transparent shader on non-Android platforms)
      • Supports: Stereo, colour tint
      • Unsupported: Lighting

    Unlit VR Shaders

    Very similar to the previous Unlit shaders, but with some extra functionality often used for 360 / 180 VR videos, and culling reversed to make the mesh (usually a sphere) visible from inside:

    • VR-InsideSphere
      • Supports: Stereo, fog, Equi-rectangular 360 and 180 video layout
      • Unsupported: Lighting, transparency
    • VR-InsideSphere-Transparent
      • Supports: Stereo, fog, Equi-rectangular 360 and 180 video layout, transparency
      • Unsupported: Lighting
    • VR-InsideSphere-StereoUV
      • This is a special case, it's the same as VR-InsideSphere but uses a different texture coordinate set per eye. This is useful fo custom layouts specified via UV coordinates
      • Supports: Stereo, fog, custom video layouts
      • Unsupported: Lighting, transparency
    • VR-InsideSphere-AndroidOES
      • Android OES mode only (it will fall back to the VR-InsideSphere shader on non-Android platforms)
      • Supports: Stereo, fog, Equi-rectangular 360 and 180 video layout
      • Unsupported: Lighting, transparency
    • VR-InsideSphere-Transparent-AndroidOES
      • Android OES mode only (it will fall back to the VR-InsideSphere shader on non-Android platforms)
      • Supports: Stereo, fog, Equi-rectangular 360 and 180 video layout, transparency
      • Unsupported: Lighting

    Skybox Shaders

    For cases where the video is to be applied to a Skybox:

    • Skybox-Sphere
      • Supports: Stereo, Equi-rectangular 360 video layout
    • Skybox-Cube3x2
      • Supports: Stereo, Cubemap 3x2 video layout

    Lit Shaders

    For cases where the video needs to be lit by the scene:

    • Lit-Diffuse
      • Supports: Lighting, stereo, Colour tint
      • Unsupported: Transparency, fog
    • Lit-Transparent-Diffuse
      • Supports: Lighting, transparency
      • Unsupported: Stereo, fog
    Note

    Materials using these lit shaders will not automatically update when upgrading to HDRP / UWP rendering pipelines.

    In This Article