Skip to content

Instantly share code, notes, and snippets.

Avatar
🐣
チーヨ

HALBY halby24

🐣
チーヨ
View GitHub Profile
@halby24
halby24 / hack.shader
Last active Jan 28, 2021
視界ハック用頂点シェーダーメモ
View hack.shader
v2f vert (appdata v)
{
v2f o;
o.uv = v.uv;
o.vertex = float4(v.uv.x * 2 - 1, 1 - v.uv.y * 2, 0, 1);
return o;
}
@halby24
halby24 / LookAtIKInEditMode.cs
Created Jul 6, 2019
Unityのエディタ上で視線IKが動かせるスクリプトだよ
View LookAtIKInEditMode.cs
using UnityEngine;
[ExecuteInEditMode]
public class LookAtIKInEditMode : MonoBehaviour
{
[SerializeField] private bool active;
[SerializeField] private Transform target;
[SerializeField, Range(0f, 1f)] private float lookAt;
[SerializeField, Range(0f, 1f)] private float body;
[SerializeField, Range(0f, 1f)] private float head;
@halby24
halby24 / DBController.cs
Last active Nov 13, 2020
ダイナミックボーン 一括制御するやつ
View DBController.cs
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class DBController : MonoBehaviour
{
public Transform[] Bones;
[Range(0f, 1f)] public float Damping, Elasticity, Stiffness, Inert;
public float Radius;
public AnimationCurve DanpingDistrib, ElasticityDistrib, StiffnessDistrib, InertDistrib, RadiusDistrib;
@halby24
halby24 / MetallicSmoothnessTextureGenerator.cs
Last active Feb 7, 2020
Smoothness TextureからUnity Standard Shader用MetallicSmoothnessテクスチャを作ります(複数枚対応)(Metallicは固定値)
View MetallicSmoothnessTextureGenerator.cs
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
public class MetallicSmoothnessTextureGenerator : EditorWindow
{
View script.js
const num = 0;
const str = 'あ';
const bool = true;