This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RenderPointCloud : MonoBehaviour { | |
public Material material; | |
public ARKitComputeCloud cloud; | |
// Use this for initialization |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR.iOS; | |
public class ARKitComputeCloud : MonoBehaviour { | |
public int maxPointsToShow; | |
public int maxNewPoints; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/BasicPointDisplay" { | |
Properties { | |
_Texture( "Texture" , 2D ) = "white" {} | |
_Color1 ("Tip Color", Color) = (1,.4,.2,1) | |
_Color2 ("Tail Color", Color) = (1,0,0,1) | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class pointBuffer : MonoBehaviour { | |
public sdfBoneBuffer Bones; | |
public ComputeShader physics; | |
public bool update; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class BasicVertBuffer : VertBuffer { | |
public bool rotateMesh; | |
public bool scaleMesh; | |
public bool translateMesh; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class HexParticles : MonoBehaviour { | |
public AudioListenerTexture alt; | |
public RandomVertBuffer vertBuffer; | |
public ComputeBuffer transferBuffer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/HexPostTransfer" { | |
Properties{ | |
_Hue("Hue", float) = 0 | |
_Texture( "Texture" , 2D ) = "white" {} | |
} | |
SubShader { | |
// COLOR PASS | |
Pass { | |
Tags{ "LightMode" = "ForwardBase" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |