[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32412] trunk/blender/source/blender/ render/intern/source/shadeoutput.c: Add note about Inv Quad falloff of lamp that there seems to be a hack in use .
Nathan Letwory
nathan at letworyinteractive.com
Mon Oct 11 12:02:55 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11.10.2010 12:52, Nathan Letwory wrote:
> Revision: 32412
> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32412
> Author: jesterking
> Date: 2010-10-11 11:52:25 +0200 (Mon, 11 Oct 2010)
>
> Log Message:
> -----------
> Add note about Inv Quad falloff of lamp that there seems to be a hack in use.
Matt, you committed r12045 somewhere in September 2007.
LA_FALLOFF_INVSQUARE calculates something, but AFAICT it is not correct.
I just want to ask if this calculation uses this formula intentionally
or if it is a typo?
Currently switching between Lin/Quad Weighted (where linear att is 0.0f)
and Inverse Quad gives different output, but that seems wrong.
/Nathan
> case LA_FALLOFF_INVSQUARE:
> + /* NOTE: This seems to be a hack since commit r12045 says this
> + * option is similar to old Quad, but with slight changes.
> + * Correct inv square would be (which would be old Quad):
> + * visifac = lar->distkw / (lar->distkw + dist[0]*dist[0]);
> + */
> visifac = lar->dist / (lar->dist + dist[0]*dist[0]);
> break;
- --
Nathan Letwory
Letwory Interactive
http://www.letworyinteractive.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEVAwUBTLLgzqtfN7KsE0TtAQKTmwgAh4iw9JzaHcYHgJ1qD2zSVlvX0EmDvwFf
3GqbKjnsWDgBw8C1KIb8Nx2/wkNHNXxP9f58G7ZTD8yqr2xvvNm/GvNOqyDxtmO6
AwCvRbGs/sYxsmSvq5dtIy04e8WXXR95e0LmiVPC5uEpFttKDchQSKPhIi6Zm74X
cZ0eGjpAtCjra9SI0hgjgfxYEtlLMI72b8ZC1gG1uRRhN7JHmT7JH3JG5B7FRxxN
wJT2xp5LADZusxIb41mV2EAQZCQMJnIVfELizvGzo8UQf3Axcmnms0CTnBDNL37e
zS1iMwB2mJUc9JzE6rfJzijQU4J8g/QXaM0SNuiJ99I+9IH2QsGEXg==
=Dopx
-----END PGP SIGNATURE-----
More information about the Bf-committers
mailing list