Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Conversation

t-mat
Copy link

@t-mat t-mat commented Dec 6, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant