Skip to content

RenderTexture Output

Merlin edited this page Jun 12, 2021 · 1 revision

RenderTexture Output

By default the USharpVideo player uses the VideoScreenHandler component to set the current render texture that the video player is outputting to on the material that you want. This is not always a good solution depending on what you want, so the RenderTextureOutput component is also provided.

Video Screen Handler Component

This is the default easy way to handle multiple video screens and handle multiple video players in the same map without conflicts. The downside is this component needs the shader on the renderer to support fixes for AVPro video streams.

Usage

Put component on the same gameobject as the renderer you want the rendertexture to get set on, set the source video player, optionally set the standby texture to use for when the video is loading or stopped.

RenderTexture Output Component

This component handles merging the input render textures from a video player into one render texture that can be used across your world consistently. This component will apply aspect correction to the output texture to fit rendertextures to the target texture output. It will also apply the fixes for AVPro textures (flipping the Y on the texture and converting it to the correct color space). This means that the output render texture can be used in all shaders without special handling.

Usage

  1. Add a RenderTextureOutput component to some game object and convert it to an UdonBehaviour
  2. Set the source video player on the component
  3. Click the Setup Output Textue button and choose a texture resolution for the output. This can usually be left at the default of 1080p
  4. Click the create texture button and choose a save location
  5. Use the texture that was created on your materials