Skip to content

Instantly share code, notes, and snippets.

@toxicFork
Created March 15, 2015 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toxicFork/9246d07ee71f3c704f3a to your computer and use it in GitHub Desktop.
Save toxicFork/9246d07ee71f3c704f3a to your computer and use it in GitHub Desktop.
#if PLANE_CLIPPING_ENABLED
#define IN_WORLDPOS_FWDADD(i) i.posWorld
#else
#define IN_WORLDPOS_FWDADD(i) half3(0,0,0)
#endif
#define FRAGMENT_SETUP_FWDADD(x) FragmentCommonData x = \
FragmentSetup(i.tex, i.eyeVec, WorldNormal(i.tangentToWorldAndLightDir), IN_VIEWDIR4PARALLAX_FWDADD(i), ExtractTangentToWorldPerPixel(i.tangentToWorldAndLightDir), IN_WORLDPOS_FWDADD(i));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment