Skip to content

Latest commit

 

History

History

portal---ios-ar

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Portal - iOS AR

View shader on Shadertoy - Published on 2018-10-06

thumbnail

This is an experiment to create an "AR shader" by implementing the mainVR-function and using the WebCam texture as background. If you view this shader with the Shadertoy iOS app[1], you can walk around and enter the portal.

If you don't have an iOS device (or if you don't have the app installed) you can find a screen capture of the shader in action here: https://youtu.be/IzeeoD0e6Ow.

Common tab: The VR-scene is shaded using analytical area lighting. I have used code of dys129 shader "Analytic Area Light" to implement this technique: https://www.shadertoy.com/view/4tXSR4

Buffer A: Buffer A keeps track of the camera-position and calculates if the user has entered the portal.

Image tab: A raymarcher is used to render the VR scene.

[1] https://itunes.apple.com/us/app/shadertoy/id717961814

Shaders

Common

Source: Common.glsl

Buffer A

Source: Buffer A.glsl

Inputs

  • iChannel0: Buffer A (nearest, clamp, vflipped)

Image

Source: Image.glsl

Inputs

  • iChannel0: webcam (mipmap, clamp, vflipped)
  • iChannel1: Buffer A (nearest, clamp, vflipped)
  • iChannel2: texture (mipmap, repeat, vflipped)
  • iChannel3: texture (mipmap, repeat, vflipped)

Links

License

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.