sampler2D spriteTex; float4 ScaleAlpha = {1.0f, 1.0f, 1.0f, 1.0f}; struct vertexOutput { float4 oPosition : POSITION; float2 oTexCoord : TEXCOORD0; }; vertexOutput spriteVS( float4 position : POSITION, float2 texCoord : TEXCOORD0 ) { vertexOutput OUT; OUT.oPosition = position; OUT.oPosition.xy *= ScaleAlpha.xx; OUT.oTexCoord = texCoord; // BM: We need to address this issue outwith the shader, either flip // BM: the texture or the UV stream OUT.oTexCoord.y = 1 - texCoord.y; return OUT; } float4 spritePS( vertexOutput IN ) : COLOR0 { float4 oColour = tex2D(spriteTex, IN.oTexCoord); oColour.a *= ScaleAlpha.y; return oColour; } technique loadingScreen { pass p0 { VertexProgram = compile arbvp1 spriteVS(); FragmentProgram = compile arbfp1 spritePS(); DepthTestEnable = false; DepthMask = true; BlendEnable = true; BlendFunc = int2(SrcAlpha, InvSrcAlpha); } }