//Here is my shader code in HLSL // VERTEX SHADER float p = 3.141592f; float3 x = float3(1, 0, 0); float3 z = float3(0, 0, 1); float3 norm = normalize(input.normal); // find theta using the normal and z float theta = acos(dot(norm,z)); // find the x-y projection of the normal float3 proj = normalize(float3(norm.x, norm.y, 0)); // find phi using the x-y projection and x float phi = acos(dot(proj,x)); // if x-y projection is in quadrant 3 or 4, then phi = 2PI - phi if (proj.y < 0) phi = 2*p - phi; float3 coords = float3(phi / (2*p), theta / p, 0); output.texCoord = coords; // PIXEL SHADER float4 color = float4(tex2D(gSampler,float2(input.texCoord.x,input.texCoord.y)).rgb,1); return color;

Any help would be appreciated, I'd love it, if this looked good

**Edited by Muzzy A, 29 August 2012 - 11:34 PM.**