How to compute double spherical integral

Started by
1 comment, last by LorenzoGatti 3 years, 3 months ago

I got this equation I want to integrate over a sphere:

pow( clamp( dot(-vSurfaceToCameraDir, vLight + vNormal * C1), 0, 1 ), C2 )

C1 & C2 are constants and vSurfaceToCameraDir, vLight & vNormal are unit vectors that can point in any direction. If C1=0 this would add up to π/(C2 + 1). However now we have the 2nd spherical integration with vNormal.

Is there some analytical way to compute this? If not I suppose I can do a numeric integration by making lots of random samples but I thought there might be some more elegant & faster way.

Advertisement

Your function should be something relatively simple with trigonometric functions. Can you find it in tables of known integrals, or use some computer algebra software to find a formula for you?

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement