Skip to content

Instantly share code, notes, and snippets.

@sapier
Created July 17, 2014 20:32
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 sapier/8a13cd2cbe2cc8e6da74 to your computer and use it in GitHub Desktop.
Save sapier/8a13cd2cbe2cc8e6da74 to your computer and use it in GitHub Desktop.
video::SColor &vc = p.vertices[j].Color;
if(p.vertices[j].Normal.Y > 0.5) {
- applyContrast (vc, 1.2);
+ applyContrast (vc, 1.095445);
} else if (p.vertices[j].Normal.Y < -0.5) {
- applyContrast (vc, 0.3);
+ applyContrast (vc, 0.547723);
} else if (p.vertices[j].Normal.X > 0.5) {
- applyContrast (vc, 0.5);
+ applyContrast (vc, 0.707107);
} else if (p.vertices[j].Normal.X < -0.5) {
- applyContrast (vc, 0.5);
+ applyContrast (vc, 0.707107);
} else if (p.vertices[j].Normal.Z > 0.5) {
- applyContrast (vc, 0.8);
+ applyContrast (vc, 0.894427);
} else if (p.vertices[j].Normal.Z < -0.5) {
- applyContrast (vc, 0.8);
+ applyContrast (vc, 0.894427);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment