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.

108 lines
5.1 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. #ifndef IMATERIAL_DECLARATIONS_HDR
  3. #define IMATERIAL_DECLARATIONS_HDR
  4. #include "materialsystem/imaterialsystemhardwareconfig_declarations.h"
  5. //-----------------------------------------------------------------------------
  6. // Shader state flags can be read from the FLAGS materialvar
  7. // Also can be read or written to with the Set/GetMaterialVarFlags() call
  8. // Also make sure you add/remove a string associated with each flag below to CShaderSystem::ShaderStateString in ShaderSystem.cpp
  9. //-----------------------------------------------------------------------------
  10. enum MaterialVarFlags_t
  11. {
  12. MATERIAL_VAR_DEBUG = (1 << 0),
  13. MATERIAL_VAR_NO_DEBUG_OVERRIDE = (1 << 1),
  14. MATERIAL_VAR_NO_DRAW = (1 << 2),
  15. MATERIAL_VAR_USE_IN_FILLRATE_MODE = (1 << 3),
  16. MATERIAL_VAR_VERTEXCOLOR = (1 << 4),
  17. MATERIAL_VAR_VERTEXALPHA = (1 << 5),
  18. MATERIAL_VAR_SELFILLUM = (1 << 6),
  19. MATERIAL_VAR_ADDITIVE = (1 << 7),
  20. MATERIAL_VAR_ALPHATEST = (1 << 8),
  21. #if defined( _PS3 ) || defined SPU
  22. // This Material flag is specifically for the final bloom pass only (the bloom add pass).
  23. // We need to disable alpha writes for 2x MSAA otherwise this pass will cause a heavy
  24. // blurring artifact to appear. It's only ever used in bloomadd_ps3.vmt, a modified version
  25. // of bloomadd.vmt for PS3 only - Jawad.
  26. MATERIAL_VAR_NOALPHAWRITES = (1 << 30),
  27. #endif //_PS3
  28. MATERIAL_VAR_ZNEARER = (1 << 10),
  29. MATERIAL_VAR_MODEL = (1 << 11),
  30. MATERIAL_VAR_FLAT = (1 << 12),
  31. MATERIAL_VAR_NOCULL = (1 << 13),
  32. MATERIAL_VAR_NOFOG = (1 << 14),
  33. MATERIAL_VAR_IGNOREZ = (1 << 15),
  34. MATERIAL_VAR_DECAL = (1 << 16),
  35. MATERIAL_VAR_ENVMAPSPHERE = (1 << 17), // OBSOLETE
  36. // MATERIAL_VAR_UNUSED = (1 << 18),
  37. MATERIAL_VAR_ENVMAPCAMERASPACE = (1 << 19), // OBSOLETE
  38. MATERIAL_VAR_BASEALPHAENVMAPMASK = (1 << 20),
  39. MATERIAL_VAR_TRANSLUCENT = (1 << 21),
  40. MATERIAL_VAR_NORMALMAPALPHAENVMAPMASK = (1 << 22),
  41. MATERIAL_VAR_NEEDS_SOFTWARE_SKINNING = (1 << 23), // OBSOLETE
  42. MATERIAL_VAR_OPAQUETEXTURE = (1 << 24),
  43. MATERIAL_VAR_MULTIPLY = (1 << 25),
  44. MATERIAL_VAR_SUPPRESS_DECALS = (1 << 26),
  45. MATERIAL_VAR_HALFLAMBERT = (1 << 27),
  46. MATERIAL_VAR_WIREFRAME = (1 << 28),
  47. MATERIAL_VAR_ALLOWALPHATOCOVERAGE = (1 << 29),
  48. MATERIAL_VAR_ALPHA_MODIFIED_BY_PROXY = (1 << 30),
  49. MATERIAL_VAR_VERTEXFOG = (1 << 31),
  50. // NOTE: Only add flags here that either should be read from
  51. // .vmts or can be set directly from client code. Other, internal
  52. // flags should to into the flag enum in IMaterialInternal.h
  53. };
  54. //-----------------------------------------------------------------------------
  55. // Internal flags not accessible from outside the material system. Stored in Flags2
  56. //-----------------------------------------------------------------------------
  57. enum MaterialVarFlags2_t
  58. {
  59. // NOTE: These are for $flags2!!!!!
  60. // UNUSED = (1 << 0),
  61. MATERIAL_VAR2_LIGHTING_UNLIT = 0,
  62. MATERIAL_VAR2_LIGHTING_VERTEX_LIT = (1 << 1),
  63. MATERIAL_VAR2_LIGHTING_LIGHTMAP = (1 << 2),
  64. MATERIAL_VAR2_LIGHTING_BUMPED_LIGHTMAP = (1 << 3),
  65. MATERIAL_VAR2_LIGHTING_MASK =
  66. ( MATERIAL_VAR2_LIGHTING_VERTEX_LIT |
  67. MATERIAL_VAR2_LIGHTING_LIGHTMAP |
  68. MATERIAL_VAR2_LIGHTING_BUMPED_LIGHTMAP ),
  69. // FIXME: Should this be a part of the above lighting enums?
  70. MATERIAL_VAR2_DIFFUSE_BUMPMAPPED_MODEL = (1 << 4),
  71. MATERIAL_VAR2_USES_ENV_CUBEMAP = (1 << 5),
  72. MATERIAL_VAR2_NEEDS_TANGENT_SPACES = (1 << 6),
  73. MATERIAL_VAR2_NEEDS_SOFTWARE_LIGHTING = (1 << 7),
  74. // GR - HDR path puts lightmap alpha in separate texture...
  75. MATERIAL_VAR2_BLEND_WITH_LIGHTMAP_ALPHA = (1 << 8),
  76. MATERIAL_VAR2_NEEDS_BAKED_LIGHTING_SNAPSHOTS = (1 << 9),
  77. MATERIAL_VAR2_USE_FLASHLIGHT = (1 << 10),
  78. MATERIAL_VAR2_USE_FIXED_FUNCTION_BAKED_LIGHTING = (1 << 11),
  79. MATERIAL_VAR2_NEEDS_FIXED_FUNCTION_FLASHLIGHT = (1 << 12),
  80. MATERIAL_VAR2_USE_EDITOR = (1 << 13),
  81. MATERIAL_VAR2_NEEDS_POWER_OF_TWO_FRAME_BUFFER_TEXTURE = (1 << 14),
  82. MATERIAL_VAR2_NEEDS_FULL_FRAME_BUFFER_TEXTURE = (1 << 15),
  83. MATERIAL_VAR2_IS_SPRITECARD = (1 << 16),
  84. MATERIAL_VAR2_USES_VERTEXID = (1 << 17),
  85. MATERIAL_VAR2_SUPPORTS_HW_SKINNING = (1 << 18),
  86. MATERIAL_VAR2_SUPPORTS_FLASHLIGHT = (1 << 19),
  87. MATERIAL_VAR2_USE_GBUFFER0 = (1 << 20),
  88. MATERIAL_VAR2_USE_GBUFFER1 = (1 << 21),
  89. MATERIAL_VAR2_SELFILLUMMASK = (1 << 22),
  90. MATERIAL_VAR2_SUPPORTS_TESSELLATION = (1 << 23),
  91. // Support for types of vertex compression:
  92. MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_BIT = 26,
  93. MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_FULL = ( VERTEX_COMPRESSION_FULL << MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_BIT ),
  94. MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_NOUV = ( VERTEX_COMPRESSION_NOUV << MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_BIT ),
  95. MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_MASK =
  96. ( MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_FULL |
  97. MATERIAL_VAR2_SUPPORTS_VERTEX_COMPRESSION_NOUV ),
  98. };
  99. #endif