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.

131 lines
4.0 KiB

  1. //===== Copyright � Valve Corporation, All rights reserved. ======//
  2. #ifndef ISHADER_DECLARATIONS_HDR
  3. #define ISHADER_DECLARATIONS_HDR
  4. //-----------------------------------------------------------------------------
  5. // Standard vertex shader constants
  6. //-----------------------------------------------------------------------------
  7. enum
  8. {
  9. // Standard vertex shader constants
  10. VERTEX_SHADER_MATH_CONSTANTS0 = 0,
  11. VERTEX_SHADER_MATH_CONSTANTS1 = 1,
  12. VERTEX_SHADER_CAMERA_POS = 2,
  13. VERTEX_SHADER_LIGHT_INDEX = 3,
  14. VERTEX_SHADER_MODELVIEWPROJ = 4,
  15. VERTEX_SHADER_VIEWPROJ = 8,
  16. VERTEX_SHADER_SHADER_SPECIFIC_CONST_12 = 12,
  17. VERTEX_SHADER_FLEXSCALE = 13,
  18. VERTEX_SHADER_SHADER_SPECIFIC_CONST_10 = 14,
  19. VERTEX_SHADER_SHADER_SPECIFIC_CONST_11 = 15,
  20. VERTEX_SHADER_FOG_PARAMS = 16,
  21. VERTEX_SHADER_VIEWMODEL = 17,
  22. VERTEX_SHADER_AMBIENT_LIGHT = 21,
  23. VERTEX_SHADER_LIGHTS = 27,
  24. VERTEX_SHADER_LIGHT0_POSITION = 29,
  25. VERTEX_SHADER_MODULATION_COLOR = 47,
  26. VERTEX_SHADER_SHADER_SPECIFIC_CONST_0 = 48,
  27. VERTEX_SHADER_SHADER_SPECIFIC_CONST_1 = 49,
  28. VERTEX_SHADER_SHADER_SPECIFIC_CONST_2 = 50,
  29. VERTEX_SHADER_SHADER_SPECIFIC_CONST_3 = 51,
  30. VERTEX_SHADER_SHADER_SPECIFIC_CONST_4 = 52,
  31. VERTEX_SHADER_SHADER_SPECIFIC_CONST_5 = 53,
  32. VERTEX_SHADER_SHADER_SPECIFIC_CONST_6 = 54,
  33. VERTEX_SHADER_SHADER_SPECIFIC_CONST_7 = 55,
  34. VERTEX_SHADER_SHADER_SPECIFIC_CONST_8 = 56,
  35. VERTEX_SHADER_SHADER_SPECIFIC_CONST_9 = 57,
  36. VERTEX_SHADER_MODEL = 58,
  37. //
  38. // We reserve up through 217 for the 53 bones supported on DX9
  39. //
  40. VERTEX_SHADER_FLEX_WEIGHTS = 1024,
  41. VERTEX_SHADER_MAX_FLEX_WEIGHT_COUNT = 512,
  42. };
  43. //-----------------------------------------------------------------------------
  44. // forward declarations
  45. //-----------------------------------------------------------------------------
  46. class IMaterialVar;
  47. class IShaderShadow;
  48. class IShaderDynamicAPI;
  49. class IShaderInit;
  50. class CBasePerMaterialContextData;
  51. //-----------------------------------------------------------------------------
  52. // Shader flags
  53. //-----------------------------------------------------------------------------
  54. enum ShaderFlags_t
  55. {
  56. SHADER_NOT_EDITABLE = 0x1
  57. };
  58. //-----------------------------------------------------------------------------
  59. // Shader parameter flags
  60. //-----------------------------------------------------------------------------
  61. enum ShaderParamFlags_t
  62. {
  63. SHADER_PARAM_NOT_EDITABLE = 0x1
  64. };
  65. //-----------------------------------------------------------------------------
  66. // Information about each shader parameter
  67. //-----------------------------------------------------------------------------
  68. struct ShaderParamInfo_t
  69. {
  70. const char *m_pName;
  71. const char *m_pHelp;
  72. ShaderParamType_t m_Type;
  73. const char *m_pDefaultValue;
  74. int m_nFlags;
  75. };
  76. //-----------------------------------------------------------------------------
  77. // Standard vertex shader constants
  78. //-----------------------------------------------------------------------------
  79. enum
  80. {
  81. // Standard vertex shader constants
  82. VERTEX_SHADER_LIGHT_ENABLE_BOOL_CONST = 0,
  83. VERTEX_SHADER_LIGHT_ENABLE_BOOL_CONST_COUNT = 4,
  84. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_0 = 4,
  85. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_1 = 5,
  86. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_2 = 6,
  87. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_3 = 7,
  88. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_4 = 8,
  89. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_5 = 9,
  90. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_6 = 10,
  91. VERTEX_SHADER_SHADER_SPECIFIC_BOOL_CONST_7 = 11,
  92. };
  93. //-----------------------------------------------------------------------------
  94. // Shader dictionaries defined in DLLs
  95. //-----------------------------------------------------------------------------
  96. enum PrecompiledShaderType_t
  97. {
  98. PRECOMPILED_VERTEX_SHADER = 0,
  99. PRECOMPILED_PIXEL_SHADER,
  100. PRECOMPILED_SHADER_TYPE_COUNT,
  101. };
  102. //-----------------------------------------------------------------------------
  103. // Flags field of PrecompiledShader_t
  104. //-----------------------------------------------------------------------------
  105. enum
  106. {
  107. // runtime flags
  108. SHADER_IS_ASM = 0x1,
  109. SHADER_FAILED_LOAD = 0x2,
  110. };
  111. #endif