Thursday, December 13, 2012

[android-developers] vignette formula

I noticed the vignette effect on Android looks really good.

In the code, it boils down to this surprising formula:

float lumen = shade / (1.0 + exp((dist * inv_max_dist - range) * slope)) + (1.0 - shade);

Anyone know where this formula comes from?  I was definitely surprised to see a cameo from the irrational number e.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment