How to change the material of a RawImage from "SemanticsDisplay.unity

Include the following details (edit as applicable):

  • Issue category: Semantic Segmentation
  • Device type & OS version: iPhone 11pro+ on iOS 17.1
  • Host machine & OS version: Mac on Ventura 13.6.6
  • Issue Environment : Unity Remote
  • Xcode version: 15.1
  • ARDK version: 3.4
  • Unity version: 2021.3.33f1

Description of the issue:
Is it possible to change the material of the RawImage from “SemanticsDisplay.unity” to something other than the set Shader?
For example,
For example, is it possible to use my own Texture as the material for the RawImage?
Is it possible to use a dynamic Shader as a RawImage material?
Is it possible to set a 3D object or particle as a material?
Please let me know.

Hi Noriko,

With these questions also being asked on Discord, I’ll forward the discussion here:

ME: Yes to essentially all of your questions. For the 3d object part, you would want to have a separate camera that renders to a texture you pass to the shader

YOU: Thanks for the reply." What do you mean by “you would want to have a separate camera that renders to a texture you pass to the shader”? Does it mean that there will be three different textures to load? For example, _MainTex(), _SemanticTex(), _3DOnjectTex()? Please tell me.

ME: The main texture is what the camera sees, the semantic texture has the color-coded confidence values for a particular semantic channel (i.e. the darker areas are where you would draw your 3d object), and a third texture, your 3d object texture, would be where your secondary camera renders your object to. You would overlay your 3d object texture where the semantic texture is the darkest (IIRC)

Kind regards,
Maverick L.