|
@@ -30,15 +30,15 @@ Object.defineProperty(THREE.SpotLight.prototype, "power", {
|
|
|
get: function() {
|
|
|
|
|
|
// intensity = power per solid angle.
|
|
|
- // ref: equation (15) from http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf
|
|
|
- return this.intensity * 4 * Math.PI;
|
|
|
+ // ref: equation (17) from http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf
|
|
|
+ return this.intensity * Math.PI;
|
|
|
|
|
|
},
|
|
|
set: function( power ) {
|
|
|
|
|
|
// intensity = power per solid angle.
|
|
|
- // ref: equation (15) from http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf
|
|
|
- this.intensity = power / ( 4 * Math.PI );
|
|
|
+ // ref: equation (17) from http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf
|
|
|
+ this.intensity = power / Math.PI;
|
|
|
|
|
|
}
|
|
|
|