Is refraction in SceneKit possible?

旧城冷巷雨未停 提交于 2019-12-06 10:16:51

问题


Is it possible to make a shape that passes through light so you can see through it with the light bent due to refraction? Like a lens or a glass (or water)?


回答1:


Yes, everything is possible with the amazing power of Physics! You'll need to create your own shader though. From Wikipedia:

In the field of computer graphics, a shader is a computer program that is used to do shading: the production of appropriate levels of color within an image, or, in the modern era, also to produce special effects or do video post-processing. A definition in layman's terms might be given as "a program that tells a computer how to draw something in a specific and unique way".

objc.io has a great tutorial on SceneKit if you're interested.



来源:https://stackoverflow.com/questions/31276054/is-refraction-in-scenekit-possible

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