SSR_Common.hlsl 400 B

1234567891011121314151617
  1. #ifndef SSR_COMMON
  2. #define SSR_COMMON
  3. // XR is not supported but we leave this macro for future uses
  4. #define SSRStereoTransformScreenSpaceTex(x) UnityStereoTransformScreenSpaceTex(x)
  5. //#define SSRStereoTransformScreenSpaceTex(x) x
  6. #define dot2(x) dot(x, x)
  7. inline half getLuma(float3 rgb) {
  8. const half3 lum = float3(0.299, 0.587, 0.114);
  9. return dot(rgb, lum);
  10. }
  11. #endif // SSR_BLUR