Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Const float arrays in shadergraph via custom function

Discussion in 'Graphics Experimental Previews' started by windspiek, Apr 25, 2019.

  1. windspiek

    windspiek

    Joined:
    Jun 17, 2018
    Posts:
    5
    Hey there,
    I am trying to get a float array into shadergraph via a custom node using the 5.13.0 version of shadergraph/lwrp.

    Since shadergraph does not support variable arrays as parameters I created a custom node to sample an array.
    I set the array in a script using material.SetFloatArray("windArray", windfield) but I am not getting any output in the shader.

    I would much appreciate any hints here from anyone who has more experience extending shadergraph.
    Thanks!

    As general feedback I would love for Unity to re-implement additional parameters types, as they are very restrictive at the moment.

    upload_2019-4-25_18-11-30.png
     
  2. rneumann

    rneumann

    Joined:
    Sep 20, 2018
    Posts:
    1
    Has anybody had success with this? I'm trying to do the same thing and am kind of stuck there, too...
     
  3. patrickfp93

    patrickfp93

    Joined:
    May 10, 2020
    Posts:
    1
    hi. You need the Textures2D with "TextureFormat.RGBAFloat" for to use like array1D or array2D on code C# without custom function.