Gregory Igehy

Dancing at hemisphere coordinate

Note of importance sampling of Phong

About

  • Phong の重点サンプリング関連の URL

URL

Note

// By NOTES ON IMPORTANCE SAMPLING @ AUGMENTED PIXELS

vec2 importance_sample_phong( vec2 xi )
{
  float phi   = 2.0f * PI * xi.x;
  float theta = acos( pow( 1.0f - xi.y,
                           1.0f / ( n + 1.0f ) ) );
  return vec2( phi, theta );
}