My teapot is now rendered by Hemispherelighting using a vertex&pixelshader.
What I have a problem with now is the damn matrices.
I thought I would let blitz handle the movement of the meshes and therefor only pass their matrices to the dx renderer using GetMatelement.
But no matter how I try I can't get it to work properly.
For instance.
If I create a camera(or pivot) in blitz and move it to position 0,0,-5 the camera is looking towards the center.
Now if I pass the GetMatElement values to the dxrenderer it seems it looks the other way.
Because if I position the camera(pivot) at 0,0,5 , then I can see the center(I have the teapot positioned at the world center).
I saw in another thread that blitz use 3x4 matrices so I figured that I only had to fill in the fourth column myself.
Like this:
0.0
0.0
0.0
1.0
And if I keep the camera in a fixed position(hardcoded in the renderer) and try to move the teapot instead it get's stretched diagonally(Not the place in the Harry Potter books ;p ).
Any matrixwizards out there who can shed some light on this?
What I have a problem with now is the damn matrices.
I thought I would let blitz handle the movement of the meshes and therefor only pass their matrices to the dx renderer using GetMatelement.
But no matter how I try I can't get it to work properly.
For instance.
If I create a camera(or pivot) in blitz and move it to position 0,0,-5 the camera is looking towards the center.
Now if I pass the GetMatElement values to the dxrenderer it seems it looks the other way.
Because if I position the camera(pivot) at 0,0,5 , then I can see the center(I have the teapot positioned at the world center).
I saw in another thread that blitz use 3x4 matrices so I figured that I only had to fill in the fourth column myself.
Like this:
0.0
0.0
0.0
1.0
And if I keep the camera in a fixed position(hardcoded in the renderer) and try to move the teapot instead it get's stretched diagonally(Not the place in the Harry Potter books ;p ).
Any matrixwizards out there who can shed some light on this?