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/OpticalCamouflage" | |
{ | |
Properties | |
{ | |
_MainTex("Texture", 2D) = "white" {} | |
_Brightness("Brightness", float) = 0.1 | |
_OffsetScale("Offset Scale", Range(0.0, 1.0)) = 1.0 | |
_RgbShiftScale("RGB Shift Scale", Range(0.0, 10.0)) = 1.0 | |
_Alpha("Alpha", Range(0.0, 1.0)) = 1.0 | |
} |
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.IO; | |
using UnityEngine; | |
/// <summary> | |
/// CSVデータ書き込み用クラス | |
/// </summary> | |
namespace haquxx | |
{ | |
public class CSVWriter | |
{ |
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.Generic; | |
using System.IO; | |
using UnityEngine; | |
/// <summary> | |
/// CSVデータ読み込み用クラス | |
/// </summary> | |
namespace haquxx | |
{ | |
public static class CSVReader |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from PIL import Image | |
import sys | |
import os | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("input", help=".csv file path", type=str) |
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; | |
/// <summary> | |
/// 非同期処理を待って処理する例 | |
/// </summary> | |
public class CoroutineTest : MonoBehaviour | |
{ | |
private void Start() |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using UnityEngine; | |
/// <summary> | |
/// 無理やりリフレクション | |
/// 継承やインターフェイスを使った方がいい | |
/// </summary> |
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 BoxColliderToFit : MonoBehaviour | |
{ | |
[ContextMenu("Add BoxCollider")] | |
private void AddBoxCollider() | |
{ | |
Vector3 cachedPosition = Vector3.zero; |
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; | |
[Flags] | |
public enum EnvironmentMode | |
{ | |
None = 1 << 0, | |
Daytime = 1 << 1, |
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
uniform float time; | |
uniform vec2 resolution; | |
uniform float sValue; | |
out vec4 fragColor; | |
mat2 rotate(float a) | |
{ | |
float c = cos(a); | |
float s = sin(a); |
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.IO.Compression; | |
public class ByteConverter | |
{ | |
/// <summary> | |
/// Compress using deflate. |