Skip to content

Instantly share code, notes, and snippets.

@hecomi
hecomi / DistanceFunction.shader
Last active May 13, 2019 16:53
Truchet Tentacles
// original code: https://www.shadertoy.com/view/ldfGWn
inline float rand(float3 r)
{
return frac(sin(dot(r.xy, r.yz)));
}
inline float truchetarc(float3 pos)
{
float p = 4.0 + 2.0 * _SinTime.w;
@hecomi
hecomi / gnuplot.h
Last active January 16, 2021 05:38
古いの直したやつ
/*! @file
@brief gnuplotクラス
@author hecomi (http://d.hatena.ne.jp/hecomi/)
@date December 09, 2010. ver. 1.03
10/07/05 完成
10/07/12 ログプロット/reset/PNG出力追加
10/07/13 マルチプロット
10/12/09 ヘッダファイルのみに変更
*/
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Ricty Discord",
"editor.fontSize": 14,
"editor.referenceInfos": false,
"vim.otherModesKeyBindings": [
{
"before": ["j"],
"after": ["g", "j"]
},
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Ricty Discord",
"editor.fontSize": 14,
"editor.referenceInfos": false,
"vim.otherModesKeyBindings": [
{
"before": ["j"],
"after": ["g", "j"]
},
using System;
using System.Linq;
using System.Threading;
using UnityEngine;
using Windows.Kinect;
public class DepthParticle : MonoBehaviour
{
public MultiSourceManager multiSouceManager;
public ParticleSystem particleSystem;
Shader "Custom/DeferredSurface"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
using UnityEngine;
public class PrintNumberOfCameras : MonoBehaviour
{
void Start()
{
Debug.Log(WebCamTexture.devices.Length);
}
}
@hecomi
hecomi / CameraList.cs
Last active September 18, 2016 12:35
using UnityEngine;
using System.Collections;
public class CameraTest : MonoBehaviour
{
public int cameraNumber = 0;
private WebCamTexture webcamTexture;
void Start()
{
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;
using System.Collections;
public class SyncPlayerUI : NetworkBehaviour
{
[SyncVar(hook="OnIdChanged")]
private string id_;
Shader "Hidden/ScreenSpaceLocalReflection"
{
Properties
{
_MainTex("Base (RGB)", 2D) = "" {}
}
SubShader
{