Is refraction possible in SceneKit?

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

+2
source share
1 answer

Yes, everything is possible with the amazing power of physics! However, you need to create your own shader. From Wikipedia :

In the field of computer graphics, a shader is a computer program that is used for shading: producing the appropriate color levels in an image, or, in the modern era, also producing special effects or post-processing video. A non-specialist definition can be defined as "a program that tells the computer how to draw something in a specific and unique way."

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

+2
source

Source: https://habr.com/ru/post/1011945/


All Articles