Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 3.51 KB

File metadata and controls

50 lines (34 loc) · 3.51 KB

Material / RawImage / RenderTexture Rendering Mode

It is also possible to render the video to Material / RawImage / RenderTexture without the recommended externalSurface render mode with OVR component.

Material

Create a new Material from Assets > Create > Material and attach it to the GameObject that is going to be used as screen and to the stream controller component.

You can also use the Resources > Materials > HISPlayerDefaultMaterial.mat we provide in our package.

In the HISPlayer multistream properties, set the RenderMode as Material.

image image

Linear Color Space Usage

If you use Linear Color Space in the Unity project settings, please use HISPlayerDefaultMaterial.mat in Packages/HISPlayerSDK/HisPlayer/Resources/Materials/. It uses the HISPlayerDefaultShader.shader that will fix color issue with Linear Color Space.

Raw Image

This action will be related to Unity’s Canvas. If there is not a Canvas created yet, creating a Raw Image will create one automatically.

For the creation, select GameObject > UI > Raw Image. Once it is created, attach it to the stream controller component.

In the HISPlayer multistream properties, set the RenderMode as RawImage.

image

Linear Color Space Usage

If you use Linear Color Space in the Unity project settings, please attach HISPlayerDefaultMaterialRawImage.mat in Packages/HISPlayerSDK/HisPlayer/Resources/Materials/ to the material attribute of the RawImage component. It uses the HISPlayerDefaultShaderRawImage.shader that will fix color issue with Linear Color Space.

RenderTexture

For this you can use the RenderTexture we provide or create a RenderTexture from zero. In the first case, go to the Resources folder of our package and attach the Resources > Materials > HISPlayerDefaultMaterialRenderTexture.mat to the GameObject that is going to be used as screen and the Resources > RenderTextures > HISPlayerRenderTexture.renderTexture to the stream controller component.

For creating it from zero, select Assets > Create > Render Texutre and then create a Material referencing the Render Texture. This last action can be done automatically by grabbing the Render Texture and dropping it at the end of a GameObject's Inspector with the component Mesh Renderer with Material field empty. This will create the new material inside a Materials folder.

Once all this process it’s done, associate the RenderTexture to the script component.

In the HISPlayer multistream properties, set the RenderMode as RenderTexture.

Linear Color Space Usage

If you use Linear Color Space in the Unity project settings, please use HISPlayerDefaultRenderTexture.renderTexture in Packages/HISPlayerSDK/HisPlayer/Resources/RenderTextures/. This file is a custom RenderTexture with the attached HISPlayerDefaultMaterialRenderTexture.mat that will fix color issue with Linear Color Space.