Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.7 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: These are declarations (functions, structs, enums) used in both
  4. // SPU and PPU on PS/3, as well as potentially on different processor targets
  5. // on future platforms
  6. //===========================================================================//
  7. #ifndef BASESHADER_SHARED_DECLARATIONS_HDR
  8. #define BASESHADER_SHARED_DECLARATIONS_HDR
  9. //-----------------------------------------------------------------------------
  10. // Standard material vars
  11. //-----------------------------------------------------------------------------
  12. // Note: if you add to these, add to s_StandardParams in CBaseShader.cpp
  13. enum ShaderMaterialVars_t
  14. {
  15. FLAGS = 0,
  16. FLAGS_DEFINED, // mask indicating if the flag was specified
  17. FLAGS2,
  18. FLAGS_DEFINED2,
  19. COLOR,
  20. ALPHA,
  21. BASETEXTURE,
  22. FRAME,
  23. BASETEXTURETRANSFORM,
  24. FLASHLIGHTTEXTURE,
  25. FLASHLIGHTTEXTUREFRAME,
  26. COLOR2,
  27. SRGBTINT,
  28. NUM_SHADER_MATERIAL_VARS
  29. };
  30. // Alpha belnd mode enums. Moved from basevsshader
  31. enum BlendType_t
  32. {
  33. // no alpha blending
  34. BT_NONE = 0,
  35. // src * srcAlpha + dst * (1-srcAlpha)
  36. // two passes for HDR:
  37. // pass 1:
  38. // color: src * srcAlpha + dst * (1-srcAlpha)
  39. // alpha: srcAlpha * zero + dstAlpha * (1-srcAlpha)
  40. // pass 2:
  41. // color: none
  42. // alpha: srcAlpha * one + dstAlpha * one
  43. //
  44. BT_BLEND,
  45. // src * one + dst * one
  46. // one pass for HDR
  47. BT_ADD,
  48. // Why do we ever use this instead of using premultiplied alpha?
  49. // src * srcAlpha + dst * one
  50. // two passes for HDR
  51. // pass 1:
  52. // color: src * srcAlpha + dst * one
  53. // alpha: srcAlpha * one + dstAlpha * one
  54. // pass 2:
  55. // color: none
  56. // alpha: srcAlpha * one + dstAlpha * one
  57. BT_BLENDADD
  58. };
  59. #endif