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.

22 lines
707 B

  1. //
  2. // - This is the fog header to include for pixel shaders if the shader doesn't support pixel-shader-blended vertex fog.
  3. //
  4. // -- PIXELFOGTYPE is 0 for RANGE FOG, 1 for WATER/HEIGHT FOG --
  5. // DYNAMIC: "PIXELFOGTYPE" "0..1" [ = ( pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z ) ]
  6. #if ( PIXELFOGTYPE == 1 )
  7. // No matter what shader model we are, we do pixel fog for water.
  8. #define DOPIXELFOG 1
  9. #define HARDWAREFOGBLEND 0
  10. #else
  11. #if defined( SHADER_MODEL_PS_2_0 )
  12. // Never do pixel for for ps20 (unless we are in water)
  13. #define DOPIXELFOG 0
  14. #define HARDWAREFOGBLEND 1
  15. #else
  16. // Never do vertex fog for >ps20
  17. #define DOPIXELFOG 1
  18. #define HARDWAREFOGBLEND 0
  19. #endif
  20. #endif