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.

28 lines
739 B

  1. //========== Copyright (c) Valve Corporation, All rights reserved. ==========//
  2. // STATIC: "RELOADZCULL" "0..0" [XBOX]
  3. // STATIC: "RELOADZCULL" "0..0" [PC]
  4. // STATIC: "RELOADZCULL" "0..1" [SONYPS3]
  5. #include "common_ps_fxc.h"
  6. struct PS_INPUT
  7. {
  8. float4 vColor : COLOR0;
  9. };
  10. HALF4 main(
  11. PS_INPUT i
  12. #if RELOADZCULL
  13. , out float flDepth : DEPTH
  14. #endif // RELOADZCULL
  15. ) : COLOR
  16. {
  17. #if RELOADZCULL
  18. // When reloading Zcull memory on the PS3, we need to draw a quad with depth = 0 (so it doesn't get early-culled) but then emit a depth of 1.0
  19. // because we need to guarantee that every pixel is rejected by the hardware and simply forces the ROP unit to update Zcull memory
  20. flDepth = 1.0f;
  21. #endif // RELOADZCULL
  22. return i.vColor;
  23. }