// clouds : fix plane disapearing above clouds when activated (but also create bugs when not in front of clouds)
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
//   float4x4 g_mViewProj;
//   float4 g_vSettings0;
//   float4 g_vSettings1;
//
//
// Registers:
//
//   Name         Reg   Size
//   ------------ ----- ----
//   g_mViewProj  c0       4
//   g_vSettings0 c4       1
//   g_vSettings1 c5       1
//
//
// Default values:
//
//   g_mViewProj
//     c0   = { 0, 0, 0, 0 };
//     c1   = { 0, 0, 0, 0 };
//     c2   = { 0, 0, 0, 0 };
//     c3   = { 0, 0, 0, 0 };
//
//   g_vSettings0
//     c4   = { 0, 0, 0, 0 };
//
//   g_vSettings1
//     c5   = { 0, 0, 0, 0 };
//

    vs_3_0
    def c6, 1, 0, 0.5, 0
def c220, 3,2.1, -2.0 , 0.2	
    dcl_position v0
    dcl_position o0
    dcl_texcoord o1
    mul r0.xz, c4.yyxw, v0
    mad r0.yw, v0.y, c6.xxzy, c6.xyzx
    dp4 r1.x, r0, c0
    dp4 r1.y, r0, c1
    dp4 r1.w, r0, c3
    dp4 r1.z, r0, c2
    mul r0.xyz, r1.xwyw, c6.z
mov r5.x, c221.w
if_ne r5.x, c6.y
// Fix
	add r1.z, r1.z, c220.x
	add r1.w, r1.w, c220.y
	add r1.x, r1.x, c220.z
	add r1.y, r1.y, c220.w
//	end of fix
endif	
    mov o0, r1
    mov o1.zw, r1
    mad r1.y, r1.w, c6.z, -r0.z
    add r1.x, r0.y, r0.x
    mul r0.xy, r1.w, c5
    mad o1.xy, r1, c5.zwzw, r0
// approximately 13 instruction slots used
