I’m using CG to try out some geometry instancing, the passing of an instance position to the shader via an array works ok, but how does one change the rotation of an instance?
I’m not sure if a 4x4 matrix needs to be supplied, or if I can pass the shader an HPR and it’ll do the transform.
Stone the flaming crows, after fiddling around for 2 hours - I’ve got it working with the flocking demo
Try this:
# Compute the modelview matrix for each node
self.modelViewMatrices = [UnalignedLMatrix4f(modelMatrix * self.viewMatrix) for modelMatrix in self.modelMatrices]
If you want to enable the camera moving, you’ll need to reset the viewMatrix in the IssueShaderParameters function.
I might end up cutting this down to a sample thats just the basics, thanks for the help