Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Resolved Can no longer use Render Textures in Sample Texture 2D node in Unity 2022?

Discussion in 'Visual Effect Graph' started by ssojyeti2, Oct 31, 2023.

  1. ssojyeti2

    ssojyeti2

    Joined:
    Mar 16, 2020
    Posts:
    16
    Not sure if my Unity 2022 settings need tweaking, but I can't seem to use any render textures as input for the Sample Texture 2D node in VFX Graph. In Unity 2020 and 2021, I am able to use render textures with this node--In fact, the VFX graph meteorite sample from Unity makes use of this. Has Unity removed this feature?

    upload_2023-10-31_14-46-23.png
     
  2. Julien-A

    Julien-A

    Unity Technologies

    Joined:
    Jun 10, 2021
    Posts:
    13
    ssojyeti2 likes this.
  3. ManaPotionStudios

    ManaPotionStudios

    Joined:
    Dec 26, 2016
    Posts:
    16
    For anyone on 2022.3.X as a hotfix you can manually edit meta data of a VFX graph to link required render texture. Just look up render texture's meta data with guid, fileFormatVersion and mainObjectFileID and put those values into changed field on a VFX graph.

    What field is that? Just put regular 2d texture in required slot and see in version controll system what line has changed. This is the one you need to put data from render texture meta data.

    Hope it helps.
     
    ssojyeti2 likes this.
  4. ssojyeti2

    ssojyeti2

    Joined:
    Mar 16, 2020
    Posts:
    16
    I've also found a simple temporary solution. Just use an exposed texture field property in VFX graph and then select the render texture inside the unity inspector.

    upload_2023-11-15_9-16-35.png

    upload_2023-11-15_9-16-1.png
     
    Julien-A likes this.
  5. Julien-A

    Julien-A

    Unity Technologies

    Joined:
    Jun 10, 2021
    Posts:
    13
    Hello,
    Thank you for providing a workaround!
    Hopefully the fix should be available soon.
     
  6. Julien-A

    Julien-A

    Unity Technologies

    Joined:
    Jun 10, 2021
    Posts:
    13
    Hello,
    The fix has landed and will be available with Unity 2022.3.15f1.