Hi,

I am trying to make a quad face the camera at all times. Each of the

four vertices store the centre of the quad in TEXCOORD1 and the actual

position of the vertex is in POSITION as it normally would be. In my

vertex shader I am doing this:

float3 p = Input.Centre.xyz;

float3 q = cameraPos.xyz;

float3 l = normalize(q-p); // look

float3 r = cross(float3(0.0f,1.0f,0.0f), l); // right

float3 u = cross(l, r); // up

float4x4 m;

m[0] = float4(r, 0.0f);

m[1] = float4(u, 0.0f);

m[2] = float4(l, 0.0f);

m[3] = float4(Input.Centre.xyz, 1.0f);

float4 newPos = mul(Input.Position, m);

newPos = mul(newPos, matViewProjection);

Output.Position = newPos;

I'm not seeing anything when I do this, does anybody know what I am

doing wrong with this?

Cheers,

Richy

1. I am having trouble adding a poem....what am I doing wrong?

2. I am stupid and don't know what the heck I am doing wrong on t

i amnot strong on pivot tables myself but you need t enter that formula

alondside yur original data and then include the new column in your pivot

table

--

paul

XXXX@XXXXX.COM

remove nospam for email addy!

3. StreamReader problem. What am I doing wrong?

4. eps export problem, what am I doing wrong?

5. What am I doing wrong; problem with INSERT statement (ASP/MS ACCESS)

6. 0/1 Knapsack problem, what am I doing wrong

7. My I's are coming up i's. (lower case)

8. iff statment problem - what am i doing wrong

9. percentages problem: what am I doing wrong?

10. Project build problem - what am I doing wrong?

11. Report Problem - What am I doing wrong?

12. Report problem - what am I doing wrong?

13. Is there a problem with IIF or am I doing something wrong?

14. What AM I doing wrong? (figure problem)

15. Index problem -- what am i doing wrong?

1 post • Page:**1** of **1**