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
//screen mapping | |
//https://light11.hatenadiary.com/entry/2018/06/13/235543 | |
//lighting | |
//http://alfa.hatenablog.jp/entry/2015/08/16/195933 | |
Shader "Unlit/ScreenMappingShadow" | |
{ | |
Properties | |
{ |
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 QuadTree : MonoBehaviour | |
{ | |
[SerializeField] private Texture2D _img; | |
[SerializeField] private GameObject _prefab; | |
[SerializeField] private List<GameObject> _prefabs; |
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
// based https://p5js.org/examples/simulate-flocking.html | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Boids : MonoBehaviour | |
{ | |
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; | |
public class PCacheParser | |
{ | |
public static Vector3[] Parse(string text, int elements){ | |
string str = text; | |
string[] splitStr = {"end_header"}; |
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 System.Linq; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
using System.IO; | |
#endif |
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 System.Linq; | |
using UnityEngine; | |
using System; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
using System.IO; | |
using UnityEditor.Experimental.VFX.Utility; |
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.UI; | |
namespace HOGE | |
{ | |
public class AboutContainer : MonoBehaviour | |
{ |
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 "Unlit/SplitTriangle" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_Amount ("_Amount", Range(0,1)) = 0 | |
} | |
SubShader | |
{ |
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
// https://forum.unity.com/threads/arfoundation-post-processing-stack-tracking-drift.593872/ | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[RequireComponent(typeof(Camera))] | |
public class PPFovFix : MonoBehaviour | |
{ | |
private Camera _camera; |
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
void Update() | |
{ | |
var vv = transform.position; | |
var amp = vv.magnitude; | |
var radX = (-Mathf.Atan2(vv.z,vv.x) + Mathf.PI/2f); | |
var radY = Mathf.Asin(vv.y/amp); | |
//適当に変える。 |