I gave it a run and got an error, but fixed it. I think I can manipulate this to what I would like to do with it. This shader stuff is far trickier than I was originally anticipating. Random question. I was viewing some of evolved's light code from his flashlight coding and was confused about this one bit of code:
set vector4 1,camera position x()-10,camera position y()-10,camera position z()-10,0
set effect constant vector 1,"LightPosition",1
rotate x matrix4 3,camera angle x()/57.3
rotate y matrix4 4,camera angle y()/57.3
multiply matrix4 3,3,4
set vector3 2,0,0,1
transform normals vector3 2,2,3
set vector3 5,0,0,0
set vector3 6,x vector3(2),y vector3(2),z vector3(2)
set vector3 7,0,1,0
build lookat lhmatrix4 3,5,6,7
build fov lhmatrix4 4,1,1,1,5000
multiply matrix4 3,3,4
set effect constant matrix 1,"LightProjMatrix",3
I'm trying to get this whole shader thing down and I hit this and started getting a little confused at whats going on. I believe he uses vector 1 containing 4 floats to pass off the camera positions as the light position to the shader. Then he takes the x and y angles of the camera, converts them to radians and stores them somewhere( confused here ) inside the matrices. He then multiplies the matrices together which I assume is like performing a rotation matrice. He then appears to create vectors that contain normals or is building anothing rotation matrice. He then creates the lhmatrix and another for the field of view matrix and then multiplies them which is a way of getting the rotated 3d points I assume? Like I said I'm pretty lost so if someone could please explain that to me it would be greatly appreciated.