View shader on Shadertoy - Published on 2018-10-06
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
Source: Common.glsl
Source: Buffer A.glsl
- iChannel0: Buffer A (nearest, clamp, vflipped)
Source: Image.glsl
- iChannel0: webcam (mipmap, clamp, vflipped)
- iChannel1: Buffer A (nearest, clamp, vflipped)
- iChannel2: texture (mipmap, repeat, vflipped)
- iChannel3: texture (mipmap, repeat, vflipped)
- Portal - iOS AR on Shadertoy
- An overview of all my shaders
- My public profile on Shadertoy
- https://itunes.apple.com/us/app/shadertoy/id717961814
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.