开发者

Algorithm for creating fisheye effect from a normal image

I am trying to create an OpenGL fragment shader that converts a normal image to an image that contains fish eye effect. This is what i mean by fish eye affect (http://www.marcofolio.net/photoshop/create_a_fish_eye_lens_effect_in_photoshop.html).

By normal image i mean a rendered image taken from a virtual camera in a 3d interactive environment, not an image taken from a real camera, but i gu开发者_开发技巧ess that doesnt really make much difference in terms of this problem.

Does anyone have any idea how Photoshop does it, or where i can find material that explains the algorithm?

Thanks


You don't really even need a shader in this case. From the sound of things, you have your original image as a bitmap of some sort. If that's so, just use it as a texture, and attach it to a sphere.

Of course, you can use a shader (or pair of shaders, really), but unless you're going to do more than you've described, doing so won't gain you much (if anything).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜