How to create fisheye lens effect by openGL?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 07:38:01

问题


I am trying to create lomo fisheye effect on an image using openGL. I am new to openGL, should I use cube mapping and fisheye projection? Is there any open source that I can refer to? Thanks.


回答1:


You can draw a single quad with the image textured onto it, and use a fragment shader to warp the texture coordinate per-pixel as you desire. You'll have to do all the math yourself, but it looks like the previous post here might be a good starting point.



来源:https://stackoverflow.com/questions/1919917/how-to-create-fisheye-lens-effect-by-opengl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!