home *** CD-ROM | disk | FTP | other *** search
-
- float4x4 matViewProj;
-
- float3 udir;
- float3 vdir;
- float3 cpos;
-
- float perAngle;
-
- struct VS_INPUT
- {
- float4 Pos : POSITION;
- float4 Color : COLOR;
- };
-
-
- struct VS_OUTPUT
- {
- float4 Pos : POSITION;
- float4 Color : COLOR;
-
- };
-
- //shader code
- VS_OUTPUT VShader(VS_INPUT In)
- {
- VS_OUTPUT Out;
-
- float temp = perAngle*In.Pos[0];
- temp = (temp)*(3.14159f/180.f);
-
- float rscale = In.Pos[1];
-
- In.Pos.xyz = 0;
- In.Pos += float4(udir,0)*(cos(temp)*rscale);
- In.Pos += float4(vdir,0)*(sin(temp)*rscale);
- In.Pos += float4(cpos,0);
-
- Out.Color=In.Color;
- Out.Pos = mul(matViewProj,In.Pos);
-
- return Out;
- }
-