Search Unity

Question Accessing state via a compute shader

Discussion in 'Visual Effect Graph' started by GameDeveloper1111, Oct 23, 2021.

  1. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    Is it possible to gain read-write access to a Visual Effect Graph's particle simulation state via a compute shader?

    If it's not possible my plan is to write the compute shader results to a texture and then load that data into a Visual Effect Graph via `Load Texture2D`, `stripIndex`, `particleIndexInStrip`, and `Set Position`.

    Why an external compute shader: I need to run the data transforms in `Update Particle Strip` multiple times per frame, but I'm not sure how to get a Visual Effect Graph to tick multiple times per frame.

    I welcome any thoughts or advice.