Skip to content

Instantly share code, notes, and snippets.

View yuna0x0's full-sized avatar
🍥
:3

yuna0x0 yuna0x0

🍥
:3
View GitHub Profile
@yuna0x0
yuna0x0 / ToggleTest.shader
Created May 4, 2022 07:37 — forked from keijiro/ToggleTest.shader
Shows how to use the Toggle material property drawer in a shader. See the reference manual for further details: http://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html
Shader "ToggleTest"
{
Properties
{
[Toggle(FILL_WITH_RED)]
_FillWithRed ("Fill With Red", Float) = 0
}
SubShader
{
Pass
@yuna0x0
yuna0x0 / rgbaToVec.js
Created May 4, 2022 07:30 — forked from m4n1ok/rgbaToVec.js
Convert a rgba/rgb color to vec4. Convert vec4 color to rgba
const normalize = (min, max, value) => {
if (value < min) return min
else if (value > max) return max
else return value
}
const splitChannels = (color, split) => {
color = color.replace(split, '').replace(')', '').trim()
let channels = color.split(',')
@yuna0x0
yuna0x0 / prng.cginc
Created May 4, 2022 06:52 — forked from keijiro/prng.cginc
One liner pseudo random generator with HLSL
float nrand(float2 uv)
{
return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453);
}
@yuna0x0
yuna0x0 / .gitattributes
Last active July 1, 2022 09:43 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# Set the default line endings behavior, in case people don't have core.autocrlf set.
* text=auto
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
@yuna0x0
yuna0x0 / UGuiTextToTextMeshPro.cs
Last active June 25, 2022 12:37 — forked from FairlySadPanda/UGuiTextToTextMeshPro.cs
Unity3D Editor Tool to convert Unity GUI Text objects to Text Mesh Pro Text Objects
using TMPro;
using TMPro.EditorUtilities;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
public class UGuiTextToTextMeshPro : Editor
{
[MenuItem("GameObject/UI/Convert To Text Mesh Pro", false, 4000)]
private static void DoIt()
@yuna0x0
yuna0x0 / DrawBones.cs
Created November 20, 2021 18:48 — forked from codewings/DrawBones.cs
Display bones in Unity Editor
using UnityEngine;
[ExecuteInEditMode]
public class DrawBones : MonoBehaviour
{
#if UNITY_EDITOR
public bool ShowHierarchyAlwyas = true;
public bool ShowSelectedBoneName = true;
public Color BoneColor = Color.white;
public Color SelectedBoneColor = Color.red;
@yuna0x0
yuna0x0 / chat.css
Created September 15, 2021 04:26 — forked from clngn/chat.css
YouTubeチャット用のカスタムCSS(based on https://chatv2.septapus.com/ )
@import url("https://fonts.googleapis.com/css?family=M+PLUS+Rounded+1c:700,900");
body {
overflow: hidden;
background-color: rgba(0, 0, 0, 0);
}
yt-live-chat-item-list-renderer #items {
overflow: hidden !important;
}