Skip to content

Instantly share code, notes, and snippets.

@ofedo
ofedo / A-FRAME-AR-refraction-shader.js
Created November 8, 2020 21:56
A-FRAME AR-refraction-shader
// works with
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
// based on
// https://github.com/stemkoski/AR-Examples/blob/master/refraction.html
// https://stemkoski.github.io/AR-Examples/refraction.html
<script>
AFRAME.registerComponent('refraction-shader', {
init: function() {