Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RenderPointCloud : MonoBehaviour {
public Material material;
public ARKitComputeCloud cloud;
// Use this for initialization
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.iOS;
public class ARKitComputeCloud : MonoBehaviour {
public int maxPointsToShow;
public int maxNewPoints;
float totalArea = 0;
for( int i = 0; i < triBuffer.triangles.Length/3; i++ ){
int tri0 = i * 3;
int tri1 = tri0 + 1;
int tri2 = tri0 + 2;
tri0 = triBuffer.triangles[tri0];
tri1 = triBuffer.triangles[tri1];
Shader "Custom/BasicPointDisplay" {
Properties {
_Texture( "Texture" , 2D ) = "white" {}
_Color1 ("Tip Color", Color) = (1,.4,.2,1)
_Color2 ("Tail Color", Color) = (1,0,0,1)
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class pointBuffer : MonoBehaviour {
public sdfBoneBuffer Bones;
public ComputeShader physics;
public bool update;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BasicVertBuffer : VertBuffer {
public bool rotateMesh;
public bool scaleMesh;
public bool translateMesh;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class HexParticles : MonoBehaviour {
public AudioListenerTexture alt;
public RandomVertBuffer vertBuffer;
public ComputeBuffer transferBuffer;
Shader "Custom/HexPostTransfer" {
Properties{
_Hue("Hue", float) = 0
_Texture( "Texture" , 2D ) = "white" {}
}
SubShader {
// COLOR PASS
Pass {
Tags{ "LightMode" = "ForwardBase" }
float4x4 rotateX(float angle){
angle = -angle/180.0*3.1415926536;
float c = cos(angle);
float s = sin(angle);
return float4x4(1.0, 0.0, 0.0, 0.0, 0.0, c, -s, 0.0, 0.0, s, c, 0.0, 0.0, 0.0, 0.0, 1.0);
}
float4x4 rotateY(float angle){
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
public class CaptureAudioTexture : MonoBehaviour {
private int width;
private int height; // ABOUT 60 FPS