Skip to content

Instantly share code, notes, and snippets.

@brendandawes
Created February 22, 2017 12:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendandawes/19637ac23c4e2f52de6378b43088722c to your computer and use it in GitHub Desktop.
Save brendandawes/19637ac23c4e2f52de6378b43088722c to your computer and use it in GitHub Desktop.
Better non clipping perspective in processing
float fov = PI/3;
float nearClip = 1;
float farClip = 100000;
float aspect;
// void setup()
aspect = float(width)/float(height);
// void draw()
perspective(fov, aspect, nearClip, farClip);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment