Hi guys!
This is my current issue, I'm trying to create 3d billboards, now this is how I think I should do it:
(Sample: Render thousands of grass instances)
Create Instance Buffer ( -> Position, Rotation)
Send Mesh Stuff + Instance Buffer
Shader:
{
float4x4 rMatrix = generateRotationMatrix(instanceRot);
position = mul(position, rMatrix);
position += instancepos;
...apply World, View, Proj matrices here.
...
}
But is this the best way? Because I don't think passing a constant buffer with thousands of rotation matrices would be so good, am I wrong?
What does you're experience tell you to do here?
So the real question is: How can I individually rotate thousands of instances to the cameras view?
Thank You, like always!