home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 18759 / ROE.7z / QSMATERIAL_HAIR.h < prev    next >
Encoding:
C/C++ Source or Header  |  2020-09-17  |  449 b   |  19 lines

  1. #ifndef QSMATERIAL_HAIR_H
  2. #define QSMATERIAL_HAIR_H
  3.  
  4. #define AlphaTestFactor 1.5f
  5. #define InvAlphaTestFactor (1.0f/1.5f)
  6.  
  7. //postprocess alpha in lighting, so that the alpha value's smooth, otherwise, there will be a gap which cause bad quality
  8. float AdjustALphaForAlphaTest(float alpha)
  9. {
  10.     return alpha * AlphaTestFactor;
  11. }
  12.  
  13. void HairAlphaTest(float alpha)
  14. {
  15.     clip(alpha - InvAlphaTestFactor);
  16. }
  17.  
  18. #endif // QSMATERIAL_HAIR_H
  19.