- Home /
Question by
Mister-Mortal · Jun 03, 2016 at 01:44 PM ·
c#shadershader programmingcompute shader
Setting color for compute shader structure trough c#
I have shader that has structure
struct Particle
{
float3 position;
float3 velocity;
float3 color;
};
And is used here
o.color = particleBuffer[instance_id].color;
Here's my c# structure
public struct Particle
{
public Vector3 position;
public Vector3 velocity;
public Vector3 color;
}
I set color using Vector3 but it doesn't work. Everything else works as expected.
How can I set a color while creating struct for it to be used in my shader?
Comment
Your answer
Follow this Question
Related Questions
Multiple Vectors in shader/CGINC 0 Answers
confusing compute shader results 0 Answers
Shader was doing good suddenly shows this error pls help 1 Answer
Strange behaviour on compute shader 0 Answers