CommonDeprecated.hlsl 648 B

123456789101112131415161718
  1. #ifndef UNITY_COMMON_DEPRECATED_INCLUDED
  2. #define UNITY_COMMON_DEPRECATED_INCLUDED
  3. // Function that are in this file shouldn't be use. they are obsolete and could be removed in the future
  4. // they are here to keep compatibility with previous version
  5. #if !defined(SHADER_API_GLES)
  6. // Please use void LODDitheringTransition(uint2 fadeMaskSeed, float ditherFactor)
  7. void LODDitheringTransition(uint3 fadeMaskSeed, float ditherFactor)
  8. {
  9. ditherFactor = ditherFactor < 0.0 ? 1 + ditherFactor : ditherFactor;
  10. float p = GenerateHashedRandomFloat(fadeMaskSeed);
  11. p = (ditherFactor >= 0.5) ? p : 1 - p;
  12. clip(ditherFactor - p);
  13. }
  14. #endif
  15. #endif