Search Unity

Question Rendering from a material to a RenderTexture?

Discussion in 'General Graphics' started by SpectreCular, May 14, 2022.

  1. SpectreCular

    SpectreCular

    Joined:
    Jan 15, 2015
    Posts:
    44
    I have a texture which I'm using as a background of my UI Toolkit menu.
    I would like to animate the tiling of this texture and apply various other graphical effects which, performance-wise, would make the most sense to do in a material shader. UI Builder also has built-in support for the use of RenderTextures as background images, but how does one go about rendering from a material to a RenderTexture?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
  3. SpectreCular

    SpectreCular

    Joined:
    Jan 15, 2015
    Posts:
    44
    How? I'm not seeing any option to do so. Only Texture, RenderTexture, Sprite and Vector
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    I don’t actually know, it was an honest question.

    I haven’t really used UIToolkit, it seems like a terrible, ill-conceived UI solution to me, but I was expecting it would have the capability of allowing you to render a poly with a shader of your choosing, but I guess not.