PostProcessing icon indicating copy to clipboard operation
PostProcessing copied to clipboard

Add noperspective interpolation modifier for optimization

Open t-mat opened this issue 7 years ago • 0 comments

This PR improves shader performance by noperspective interpolation modifier.

I've added the following macros to PostProcessing/Resources/Shaders/Common.cginc

  • USE_NOPERSPECTIVE : compilation switch for noperspective. If someone or some platform doesn't need noperspective, they can comment out this line.
  • NOPERSPECTIVE : macro definition of noperspective for TEXCOORD attributes.
#define USE_NOPERSPECTIVE 1

#ifndef NOPERSPECTIVE
#  if defined(USE_NOPERSPECTIVE) && (USE_NOPERSPECTIVE)
#    define NOPERSPECTIVE noperspective
#  else
#    define NOPERSPECTIVE
#  endif
#endif

t-mat avatar Dec 06 '17 09:12 t-mat