Skip to content

Instantly share code, notes, and snippets.

// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Custom/fakeRefract" {
Properties {
}
Shader "Custom/PointBufferRenderer" {
Properties {
}
SubShader{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.iOS;
public class ARKitComputeCloud : MonoBehaviour {
public Material material;
private float[] values;
#pragma kernel CSMain
#define threadX 6
#define threadY 6
#define threadZ 6
#define strideX 3
#define strideY 6
#define strideZ 6
// Trying to understand the code from
// http://lgdv.cs.fau.de/get/2234
const float t_min = .00001;
const float t_max = 35.;
const int MAX_ITERATIONS = 200;
const float infinite = 100000.;
const float PI = 3.14159;
const float MAX_TRACE_DISTANCE = 40.0; // max trace distance
using System.Collections;
using System.Collections.Generic;
using System;
using System.Reflection;
using UnityEngine;
public static class AddComp {
public static T GetCopyOf<T>(this Component comp, T other) where T : Component
{
(function() {
var Video = function(audio_url) {
this._callbacks = [];
this.domElement = document.createElement('video');
this.domElement.crossOrigin = 'anonymous';
this.domElement.setAttribute('webkit-playsinline', 'webkit-playsinline');
this.domElement.setAttribute('playsinline', 'playsinline');
var source = document.createElement("source");
source.src = "fluid.mp4"
source.type = "video/mp4"
var video = new Video("dgFW1.mp3");
video.appendChild( source );
//video.play();
void createVertBuffer(){
_vertBuffer = new ComputeBuffer( triangles.Length , AnchorStructSize * sizeof(float) );
//print( AnchorStructSize );
//print( AnchorStructSize * vc );
using UnityEngine;
using System.Collections;
using Valve.VR;
public class GetCollisionBounds : MonoBehaviour {
// Use this for initialization
void Start () {
var error = EVRInitError.None;