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.

29 lines
1.3 KiB

  1. //
  2. // - This is the fog header to include for vertex shaders if the shader doesn't support pixel-shader-blended vertex fog.
  3. //
  4. // -- DOWATERFOG is 0 for RANGE FOG, 1 for WATER/HEIGHT FOG --
  5. // DYNAMIC: "DOWATERFOG" "0..1" [ = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ]
  6. // -- DOPIXELFOG is 1 if the material has $pixelfog 1, or if the material forces pixel fog by default (lightmappedgeneric for instance.) --
  7. // FIXME! Will need to revisit this once we are doing water/height fog again. Needs to be pixel for in the water case.
  8. // STATIC: "DOPIXELFOG" "0..1" [ = g_pHardwareConfig->SupportsPixelShaders_2_b() ]
  9. // STATIC: "HARDWAREFOGBLEND" "0..0" [XBOX] [ = 0 ]
  10. // STATIC: "HARDWAREFOGBLEND" "0..1" [PC] [vs20] [ = !g_pHardwareConfig->SupportsPixelShaders_2_b() ]
  11. // STATIC: "HARDWAREFOGBLEND" "0..0" [PC] [vs30] [ = 0 ]
  12. // Can't do fixed-function fog and pixelfog at the same time, but only if we aren't doing water since HARDWAREFOGBLEND and DOPIXELFOG get redefined below.
  13. // SKIP: ( $DOWATERFOG == 0 ) && ( $DOPIXELFOG && $HARDWAREFOGBLEND )
  14. // Support either pixel fog or fixed-function fog, skip everything else.
  15. // SKIP: ( $DOWATERFOG == 0 ) && ( $HARDWAREFOGBLEND == 0 ) && ( $DOPIXELFOG == 0 )
  16. #if DOWATERFOG == 1
  17. #undef HARDWAREFOGBLEND
  18. #define HARDWAREFOGBLEND 0
  19. #undef DOPIXELFOG
  20. #define DOPIXELFOG 1
  21. #endif