This file contains 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
#pragma kernel PlacePoint | |
struct Vert{ | |
float3 pos; | |
float3 vel; | |
float3 nor; | |
float3 tang; |
This file contains 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
Properties { | |
[Toggle(Enable16Struct)] _Struct16("16 Struct", Float) = 0 | |
[Toggle(Enable24Struct)] _Struct24("24 Struct", Float) = 0 | |
[Toggle(Enable36Struct)] _Struct36("36 Struct", Float) = 0 | |
} | |
#pragma multi_compile __ Enable16Struct | |
#pragma multi_compile __ Enable24Struct |
This file contains 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 BlendShapeEventSystem : MonoBehaviour { | |
bool shapeEnabled = false; | |
Dictionary<string, float> currentBlendShapes; | |
Dictionary<string, float> oldBlendShapes; |
This file contains 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
//C# script example | |
using UnityEngine; | |
using System.Collections; | |
public class CaptureTest : MonoBehaviour { | |
// Capture frames as a screenshot sequence. Images are | |
// stored as PNG files in a folder - these can be combined into | |
// a movie using image utility software (eg, QuickTime Pro). | |
// The folder to contain our screenshots. | |
// If the folder exists we will append numbers to create an empty folder. |
This file contains 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.Playables; | |
using System.IO; | |
using System.Runtime.Serialization.Formatters.Binary; | |
public class DataAudioBuffer : MonoBehaviour { | |
public string savePath; |
This file contains 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 |
This file contains 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 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 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 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; |