Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Can I change shader properties via a shuriken effect?

Discussion in 'General Graphics' started by mrCharli3, Aug 13, 2023.

  1. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    961
    Is there any way to alter the values in this shader via my shuriken system, or do I need to switch to vfx graph?

    upload_2023-8-13_12-23-58.png
     
  2. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
    the Particle system can not make a shader, nor change it.. that is not its role/it is not constructed to be capable of that.

    what you do is construct a shader with all the mechanics/operations you need, and expose the variables/operations to shuriken through custom vertex streaming.

    https://docs.unity3d.com/Manual/PartSysVertexStreams.html

    the particle system has 2 custom data sections; 4 parameters each
    https://docs.unity3d.com/Manual/PartSysCustomDataModule.html

    for node based authoring Amplify and shader graph the process to expose the properties can be found in videos and forums
    https://realtimevfx.com/t/unity-custom-vertex-stream-and-shadergraph-amplify-shader/9524/2
     
  3. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    961
    thanks thats what i meant, i was prob unlcear! Thanks again!