Seam issue with environmental map shader


I’ve been implementing the Orange book’s equirectangular (latlong) environmental map algorithm in chapter 10. I’ve been largely successful, but have encountered a seam / discontinuity issue that I can’t quite overcome. I even rewrote the shader using the original Blinn/Newell equations but it resulted in the same effect.

Attached is a picture of the problem. Note the slight discontinuity at the top and bottom of the sphere in the middle. The views across the bottom (from left to right) represent the texture S and T coordinates, the reflection vector, and the final output.

Note in the first view (the S coordinate output), there is a seam which extends from the point of discontinuity to the outer edges of the sphere. This is obviously the ends of the map wrap over the top and bottom of the sphere and are joined in the middle. And, of course, there lies the problem: how can I eliminate the “smudge” effect at those points?

Any thoughts?


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.