SceneKit中的折射可能吗? [英] Is refraction in SceneKit possible?

查看:92
本文介绍了SceneKit中的折射可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以制作一个穿过光线的形状,这样你可以通过屈光而弯曲的光线看到它?像镜头或玻璃(或水)?

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)?

推荐答案

是的,物理学的惊人的力量一切皆有可能的!您需要创建自己的着色器。来自维基百科

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有精彩教程如果您有兴趣,可以在SceneKit上使用。

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

这篇关于SceneKit中的折射可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆