struct VS_INPUT { // vertex shader input float4 Position : POSITION; }; struct VS_OUTPUT { // vertex shader output, pixel shader input float4 hPosition : POSITION; float2 Position : TEXCOORD0; }; VS_OUTPUT PhaseVS(VS_INPUT IN) { VS_OUTPUT OUT; OUT.hPosition = IN.Position; OUT.Position = IN.Position.xy; return OUT; } float4 HenyeyGreensteinPS(VS_OUTPUT IN):COLOR0 { float4 Color; float2 UV = IN.Position; float g2 = UV.x * UV.x; float phase = 3 * (1 - g2) * (1 + UV.y * UV.y) / 2 /(2 + g2) / pow((1 + g2 - 2 * (UV.y) * (UV.x)), 1.5); Color=float4(phase, phase, phase, 1); return Color; }