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.

101 lines
4.7 KiB

  1. //===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================
  2. // STATIC: "BASETEXTURE2" "0..1"
  3. // STATIC: "BUMPMAP" "0..2"
  4. // STATIC: "BUMPMAP2" "0..1" [ps20b] [ps30]
  5. // STATIC: "BUMPMAP2" "0..0" [ps20]
  6. // STATIC: "CUBEMAP" "0..2"
  7. // STATIC: "ENVMAPMASK" "0..1"
  8. // STATIC: "BASEALPHAENVMAPMASK" "0..1"
  9. // STATIC: "SELFILLUM" "0..1"
  10. // STATIC: "NORMALMAPALPHAENVMAPMASK" "0..1"
  11. // STATIC: "FANCY_BLENDING" "0..3" [ps20b] [ps30]
  12. // STATIC: "FANCY_BLENDING" "0..0" [ps20]
  13. // STATIC: "SEAMLESS" "0..1"
  14. // STATIC: "ENVMAPANISOTROPY" "0..1" [ps20b] [ps30]
  15. // STATIC: "ENVMAPANISOTROPY" "0..0" [ps20]
  16. // STATIC: "ADDBUMPMAPS" "0..1" [ps20b] [ps30]
  17. // STATIC: "ADDBUMPMAPS" "0..0" [ps20]
  18. // disabling things that are unused for now
  19. // STATIC: "BUMPMASK" "0..0"
  20. // diffuse bump map is always true when bumpmapping is enabled, so just set it to 1
  21. #define DIFFUSEBUMPMAP 1
  22. // STATIC: "DETAIL_BLEND_MODE" "0..12"
  23. // STATIC: "DETAIL2" "0..1" [ps30]
  24. // STATIC: "DETAIL2" "0..0" [ps20b]
  25. // STATIC: "FLASHLIGHT" "0..1" [ps20b] [CONSOLE]
  26. // STATIC: "SHADER_SRGB_READ" "0..1" [XBOX]
  27. // STATIC: "SHADER_SRGB_READ" "0..0" [PC]
  28. // STATIC: "SHADER_SRGB_READ" "0..0" [SONYPS3]
  29. // STATIC: "LIGHTING_PREVIEW" "0..1" [PC]
  30. // STATIC: "LIGHTING_PREVIEW" "0..0" [CONSOLE]
  31. // STATIC: "CASCADED_SHADOW_MAPPING" "0..1" [ = g_pHardwareConfig->SupportsCascadedShadowMapping() ] [CONSOLE]
  32. // STATIC: "CASCADED_SHADOW_MAPPING" "0..0" [ = 0 ] [ps20] [PC]
  33. // STATIC: "CASCADED_SHADOW_MAPPING" "0..1" [ = g_pHardwareConfig->SupportsCascadedShadowMapping() && !ToolsEnabled() ] [ps20b] [ps30] [PC]
  34. // STATIC: "CSM_MODE" "0..0" [ = 0 ] [CONSOLE]
  35. // STATIC: "CSM_MODE" "0..0" [ = 0 ] [ps20] [ps20b] [PC]
  36. // STATIC: "CSM_MODE" "0..3" [ps30] [PC]
  37. // STATIC: "CSM_BLENDING" "0..1" // 0 is old, 1 is for new/fixed blending of CSM and baked shadows
  38. // STATIC: "PHONG" "0..1" [ps30]
  39. // STATIC: "PHONG" "0..0" [ps20] [ps20b]
  40. // DYNAMIC: "FASTPATHENVMAPCONTRAST" "0..1"
  41. // DYNAMIC: "FASTPATH" "0..1"
  42. // DYNAMIC: "WRITEWATERFOGTODESTALPHA" "0..1"
  43. // DYNAMIC: "WRITE_DEPTH_TO_DESTALPHA" "0..0"
  44. // DYNAMIC: "FLASHLIGHTSHADOWS" "0..1" [ps20b] [CONSOLE]
  45. // DYNAMIC: "FLASHLIGHTSHADOWS" "0..0" [ps20b] [ps30] [PC]
  46. // DYNAMIC: "CASCADE_SIZE" "0..1" [ = ( pShaderAPI->IsCascadedShadowMapping() ) ? 1 : 0 ] [CONSOLE]
  47. // DYNAMIC: "CASCADE_SIZE" "0..1" [ = ( pShaderAPI->IsCascadedShadowMapping() ) ? 1 : 0 ] [ps20b] [PC]
  48. // DYNAMIC: "CASCADE_SIZE" "0..0" [ps20] [ps30] [PC]
  49. // we only support detail blend modes 0, 7, 9, 10, 11, and 12
  50. // SKIP: ($DETAIL_BLEND_MODE == 1 )
  51. // SKIP: ($DETAIL_BLEND_MODE == 2 )
  52. // SKIP: ($DETAIL_BLEND_MODE == 3 )
  53. // SKIP: ($DETAIL_BLEND_MODE == 4 )
  54. // SKIP: ($DETAIL_BLEND_MODE == 5 )
  55. // SKIP: ($DETAIL_BLEND_MODE == 6 )
  56. // SKIP: ($DETAIL_BLEND_MODE == 8 )
  57. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $BASETEXTURE2 )
  58. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $BUMPMAP )
  59. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $BUMPMAP2 )
  60. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $CUBEMAP )
  61. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $ENVMAPMASK )
  62. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $BASEALPHAENVMAPMASK )
  63. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $SELFILLUM )
  64. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $NORMALMAPALPHAENVMAPMASK )
  65. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $FANCY_BLENDING )
  66. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $SEAMLESS )
  67. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $ENVMAPANISOTROPY )
  68. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $ADDBUMPMAPS )
  69. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $BUMPMASK )
  70. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $DETAIL2 )
  71. // SKIP: ($DETAIL_BLEND_MODE == 9) && ( $LIGHTING_PREVIEW )
  72. // SKIP: ($FANCY_BLENDING) && ($DETAIL_BLEND_MODE == 7 )
  73. // SKIP: ($FANCY_BLENDING) && ($BASETEXTURE2 == 0 ) && ($BUMPMAP2 == 0 )
  74. // SKIP: ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 )
  75. // program too complex for ps20. Don't do darkened cubemaps and 2 bump maps at the same time. Fairly arbitrary pairing just to get the damn thing compiling
  76. // SKIP: ( $CUBEMAP == 2 ) && ( $BUMPMAP2 ) [ps20]
  77. // program slightly more complex on 360 because of shader srgb read. Eliminate coexistance of srgb read, water fog, and darkened cubemaps
  78. // SKIP: ( $CUBEMAP == 2 ) && ( $PIXELFOGTYPE == 1 ) && ( $SHADER_SRGB_READ == 1 ) [CONSOLE]
  79. // SKIP: ( $CASCADED_SHADOW_MAPPING == 0 ) && ( $CASCADE_SIZE != 0 )
  80. // SKIP: ( $CASCADED_SHADOW_MAPPING != 0 ) && ( $SFM != 0 )
  81. // SKIP: ( $CASCADED_SHADOW_MAPPING == 0 ) && ( $CSM_MODE != 0 )
  82. // SKIP: ( $PHONG == 1 ) && ( $CASCADED_SHADOW_MAPPING == 0 )
  83. // SKIP: ( $DETAIL_BLEND_MODE == 12 ) && ( $DETAIL2 == 1 )
  84. #include "common_fog_ps_supportsvertexfog_fxc.h"
  85. #include "lightmappedgeneric_ps2_3_x.h"