Skip to content

Instantly share code, notes, and snippets.

#pragma kernel PlacePoint
struct Vert{
float3 pos;
float3 vel;
float3 nor;
float3 tang;
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
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;
//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.
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;
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
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){
Shader "Custom/HexPostTransfer" {
Properties{
_Hue("Hue", float) = 0
_Texture( "Texture" , 2D ) = "white" {}
}
SubShader {
// COLOR PASS
Pass {
Tags{ "LightMode" = "ForwardBase" }
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class HexParticles : MonoBehaviour {
public AudioListenerTexture alt;
public RandomVertBuffer vertBuffer;
public ComputeBuffer transferBuffer;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BasicVertBuffer : VertBuffer {
public bool rotateMesh;
public bool scaleMesh;
public bool translateMesh;