Seth Hoffert
04-01-2008, 02:24 PM
I've been noticing annoying aliasing at extreme angles when using (HDR) cubemaps for reflections. I'm using shaders.
In this screenshot, which depicts a portion of a torus, I am using an HDR cubemap with GL_CLAMP_TO_EDGE, and linear filtering with mipmapping. As I pivot the torus, the outlined portion of the screenshot sparkles/aliases/twinkles/whatever.
http://cse.unl.edu/~shoffert/aliased1b.png
In this next image, I've set the clamp mode to GL_CLAMP_TO_BORDER with a red border color. Apparently this nasty aliasing is coincident with the boundaries of each cubemap face.
http://cse.unl.edu/~shoffert/aliased2b.png
Finally, this image demonstrates the torus with no mipmapping at all. The twinkling is gone when I move it, but of course when I zoom out it looks sparkly all over.
http://cse.unl.edu/~shoffert/aliased3b.png
Anyone have any idea how to fix this? I'd really like to be able to use mipmaps for this... perhaps I need to tweak the LOD value in the lookup when it samples around the edges of the cubemap faces?
Thanks.
In this screenshot, which depicts a portion of a torus, I am using an HDR cubemap with GL_CLAMP_TO_EDGE, and linear filtering with mipmapping. As I pivot the torus, the outlined portion of the screenshot sparkles/aliases/twinkles/whatever.
http://cse.unl.edu/~shoffert/aliased1b.png
In this next image, I've set the clamp mode to GL_CLAMP_TO_BORDER with a red border color. Apparently this nasty aliasing is coincident with the boundaries of each cubemap face.
http://cse.unl.edu/~shoffert/aliased2b.png
Finally, this image demonstrates the torus with no mipmapping at all. The twinkling is gone when I move it, but of course when I zoom out it looks sparkly all over.
http://cse.unl.edu/~shoffert/aliased3b.png
Anyone have any idea how to fix this? I'd really like to be able to use mipmaps for this... perhaps I need to tweak the LOD value in the lookup when it samples around the edges of the cubemap faces?
Thanks.