Original Post
trying to implement specular lighting in a vertex shader exactly as d3d does in the FFP. my shader's specular part looks like this: mov r2, -c13 ; Move the camera look angle to r2. add r2, r2, -c7 ; This is the half vector; the camera look angle + the ; scene light angle. dp3 r2.w, r2, r2 ; Renormalize normal by finding magnitude and dividing rsq r2.w, r2.w ; vector by it (multiplying by 1/magnitude). mul r2, r2, r2.w dp3 r3.y, r1, r2 ; Get dot product of half vector and previously ; calculated normal vector. dp3 r3.x, r1, -c7 ; Get dot product between half vector and light direction. mov r3.w, c15.x ; Move material specular power to r3.w. lit r3, r3 ; Lit creates lighting coefficients from the two dot ; products in r3.x, and r3.y, and raises to power in r3.w. mul r3, r3, c14 ; Modulate against specular material (intensity). ;----- Output Color 1 ----- mov oD1, r3.z ; Output the final specular in oD1. ; Diffuse color is output in oD0 elsewhere. i can't figure why mine comes out so wide (power). the brightness seems ok (intensity). any tips?