PostProcessing
PostProcessing copied to clipboard
Add noperspective interpolation modifier for optimization
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 fornoperspective
. If someone or some platform doesn't neednoperspective
, they can comment out this line. -
NOPERSPECTIVE
: macro definition ofnoperspective
forTEXCOORD
attributes.
#define USE_NOPERSPECTIVE 1
#ifndef NOPERSPECTIVE
# if defined(USE_NOPERSPECTIVE) && (USE_NOPERSPECTIVE)
# define NOPERSPECTIVE noperspective
# else
# define NOPERSPECTIVE
# endif
#endif