Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Add noperspective interpolation modifier for optimization#383

Open
t-mat wants to merge 1 commit into
Unity-Technologies:v1 from
t-mat:v1
Open

Add noperspective interpolation modifier for optimization #383
t-mat wants to merge 1 commit into
Unity-Technologies:v1 from
t-mat:v1

Conversation

@t-mat

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

Copy link
Copy Markdown

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.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /