BootupScreen.fx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //////////////////////////////////////////////////////////////////////////////
  2. // ©2006 Electronic Arts Inc
  3. //
  4. // FX Shader for Bootupscreen
  5. //////////////////////////////////////////////////////////////////////////////
  6. #include "Common.fxh"
  7. // ----------------------------------------------------------------------------
  8. // Textures declaration
  9. // ----------------------------------------------------------------------------
  10. SAMPLER_2D_BEGIN(BaseTexture,
  11. string UIWidget = "None";
  12. )
  13. AddressU = Clamp;
  14. AddressV = Clamp;
  15. MinFilter = Linear;
  16. MagFilter = Linear;
  17. MipFilter = Linear;
  18. SAMPLER_2D_END
  19. // ---------------------------------------------------------------------------
  20. struct VSOutput
  21. {
  22. float4 Position : POSITION;
  23. float2 TexCoord0 : TEXCOORD0;
  24. float4 Color : COLOR0;
  25. };
  26. // ---------------------------------------------------------------------------
  27. VSOutput VS(float3 Pos : POSITION, float2 Tex : TEXCOORD0, float4 color : COLOR0 )
  28. {
  29. VSOutput Out;
  30. Out.Position.x = Pos.x/1.0 - 0.0;
  31. Out.Position.y = Pos.y/1.0 - 0.0;
  32. Out.Position.z = 0.0;
  33. Out.Position.w = 1.0;
  34. Out.TexCoord0.x = Tex.x;
  35. Out.TexCoord0.y = Tex.y;
  36. Out.Color = color;
  37. return Out;
  38. }
  39. // ---------------------------------------------------------------------------
  40. float4 PS(VSOutput In) : COLOR
  41. {
  42. return tex2D(SAMPLER(BaseTexture),In.TexCoord0)*In.Color;
  43. }
  44. technique Blit
  45. {
  46. pass P0
  47. {
  48. VertexShader = compile VS_2_0 VS();
  49. PixelShader = compile PS_2_0 PS();
  50. ZEnable = false;
  51. ZWriteEnable = false;
  52. CullMode = None;
  53. SrcBlend = SrcAlpha;
  54. DestBlend = InvSrcAlpha;
  55. AlphaBlendEnable = true;
  56. AlphaTestEnable = false;
  57. }
  58. }