Refraction example

Is there a good and up to date example about refraction? So far I found only this one but is using version 60. https://stemkoski.github.io/Three.js/Refraction.html

Thanks in advance

There are quite a few in official examples -> https://threejs.org/examples/?q=refraction

(Keep in mind - afair someone mentioned Refractor works only on flat surfaces. So if you’d like to do refraction as on the example you sent, you probably need to use cube maps with mapping.)

The pendant to the Stemkoski example is:

https://threejs.org/examples/webgl_materials_cubemap_balls_refraction

THREE.Refractor provides real-time refractions for flat surfaces and is more expensive than just using an environment map with CubeRefractionMapping.

1 Like