#Sharing vertex position data between C# and Shader Graph

1 messages · Page 1 of 1 (latest)

normal oriole
#

I currently have a math C# class that moves around a vertex visually. I want to move the visual part into a shader graph but keep the calculation in C# as a mesh collider depends on it.

I read that there's no way for C# to read from shader but it could pass data to it.
Is there a way to send data per vertex into a shader graph?

The only solution I can think of is having the script draw onto a sampled texture. Is there any better way?

normal oriole
#

I managed to use vertex color to deal with this

#

but now there's the problem of normal calculation

normal oriole
#

rght