Re: [Algorithms] Hemisphere of points ?
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2007-03-05 21:52:41
|
Paul at Home wrote: > I guess the best way of all to speed this up is to do no raycasting at all. > Once I'm happy with the quality of my output, I'm going to look at doing > some math based area of occlusion calculations based on faces in the near > cache. I'd love to do it all on the GPU but I reckon making that work is > beyond my patience level! > You can do a projection onto the visible frustum of the texel in the direction of the surface normal, and rasterize your scene, with some fading function based on distance-from-texel. That really ought not to be tricky, assuming you have a working "render from point X" function and can override the shading. Skip the outermost 5 degrees on each side (for a 170 degree frustum) as they will contribute very little with the cosine term. Rasterize into, say, a 32x32 render target, then calculate the average of that target. You will have to compensate for the anisotropy of each pixel in the render target, but that is a pre-process weighting matrix you can calculate once (and fudge if you want :-) Really, you have the patience! Then post code and scree shots :-) Cheers, / h+ |