I guess it is my lack of basic understanding of shaders, but does anyone know a way to get the info out of the Particle Custom Stream into the Shaderforge Shader by using the Code snippet/ function module?
I saw @Keith posting a vertex struct snippet over in the Unity 5.5 Beta post, I guess that is too low level to get into a function in Shaderforge…
Also there is a request already in the Support Forums… So my hopes are not too high that there is a workaround out there…
I’m not too familiar with ShaderForge, but i thought I’d seen that you could use additional UVs in the node graph. If I’ve got that right, you ought to be able to match these up with the TEXCOORDx labels in the Particle System Renderer custom stream UI.
ah cool thanks, found it. this one helped in particular. Now I can feed velocity into shader forge… just have to find out what zw|x means… zw stands for x and z velocity, no idea how to get the y velocity though
edit: I guess the y velocity is somehow incorporated into the x and z direction, that might be what that zw |x is hinting at. because in shaderforge I only get to access uvzw when using velocity in the stream. U and V behave static as they always do and are just plain UVs, zw are modulated by velocity and hopefully somehow incorporate the y direction…
edit2: a kk, zw seem to describe two angles, that could be why a third component is missing. I don’t get it
aaaahhh, it seems they are kind of physical velocity vectors, again only two of them… but cool.
It’s a bit wasteful to have a stream present that isn’t used (UV2), but it will make your velocity stream fit nicely into the second TEXCOORD channel without any complications