 				float ay = abs(y);
 				float az = abs(z);
 
-
 				if (ax >ay && ax > az && x>=0)
 				{
-					st.x = -(z / ax);
+					st.x = -z / ax;
 					st.y = -y / ax;
 
 					return RIGHT;

				int TextureIndex = GetCubemapIndex( View, st );
				//return float4(View.x, View.y,View.z,1);
				//return float4(st.x,st.y,0,1);
				st += float2(1,1);
				st /= float2(2,2);
				st.y = 1 - st.y;

				bool RenderFaceDebug = false;
				if ( RenderFaceDebug )
				{
					if ( TextureIndex == TOP )		return float4( 1, 0, 0, 1 );//tex2D( CubemapTop, st );
					if ( TextureIndex == BOTTOM )	return float4( 0, 1, 0, 1 );//tex2D( CubemapBottom, st );
					if ( TextureIndex == LEFT )		return float4( 0, 0, 1, 1 );//tex2D( CubemapLeft, st );
					if ( TextureIndex == RIGHT )	return float4( 1, 1, 0, 1 );//tex2D( CubemapRight, st );
					if ( TextureIndex == FRONT )	return float4( 0, 1, 1, 1 );//tex2D( CubemapFront, st );
					if ( TextureIndex == BACK )		return float4( 1, 0, 1, 1 );//tex2D( CubemapBack, st );
				}        	
				if ( TextureIndex == TOP )		return tex2D( CubemapTop, st );
				if ( TextureIndex == BOTTOM )	return tex2D( CubemapBottom, st );
				if ( TextureIndex == LEFT )		return tex2D( CubemapLeft, st );

		#define FRONT 4
		#define BACK 5




			float2 STtoUV(float2 st)
			{
				st += float2(1,1);
				st /= float2(2,2);
				return st;
			}

			float2 UVtoST(float2 uv)
			{
				uv *= float2(2,2);
				uv -= float2(1,1);
				return uv;
			}

			//	returns index and xy sample
			int GetCubemapIndex(float3 View,out float2 st)
			{
				//	gr: if this appears to be getting the wrong angle (left/right/forward/back), it's because the screens need to face the same direction as the actor
				View = normalize(View);

				float x = View.x;
				float y = View.y;
