Skip to content

Instantly share code, notes, and snippets.

View JT5D's full-sized avatar
💭
Multiversing...

JT5D JT5D

💭
Multiversing...
View GitHub Profile
@IRCSS
IRCSS / Raymarcher.shader
Created September 20, 2019 11:53
Raymarcher Shader
// ===================================================================================================================
// Raymarching shader. The shader uses code from two sources. One articles by iq https://www.iquilezles.org/www/articles/terrainmarching/terrainmarching.htm
// Another source is for the PBR lighting, the lighting is abit of an over kills, https://github.com/Nadrin/PBR/blob/master/data/shaders/hlsl/pbr.hlsl
// ===================================================================================================================
Shader "Unlit/Raymarcher"
{
SubShader
{
@nir1082
nir1082 / Hologram.shader
Created December 18, 2018 03:54
[Unity] シンプルなホログラムっぽいシェーダー
Shader "Custom/Hologram" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
[HDR]_Emission ("Emission", Color) = (0.0, 0.0, 0.0, 0.0)
_Speed ("Scroll Speed", float) = .5
_Space ("Space", Range(0,1)) = .1
_Division ("Division Count", float) = 150
}
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
//Star Nest algorithm by Pablo Román Andrioli
//Unity 5.x shader by Jonathan Cohen
//This content is under the MIT License.
//
//Original Shader:
//https://www.shadertoy.com/view/XlfGRj
//
@bpesquet
bpesquet / .gitattributes-lfs-unity
Last active December 7, 2022 22:37
.gitattributes file for LFS with Unity
* text=auto
# Unity files
*.meta -text -merge=unityamlmerge
*.unity -text -merge=unityamlmerge
*.asset -text -merge=unityamlmerge
*.prefab -text -merge=unityamlmerge
# Image formats
*.psd filter=lfs diff=lfs merge=lfs -text
@johnhw
johnhw / umap_sparse.py
Last active May 11, 2025 07:18
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@dxball
dxball / Gradient.cs
Created August 10, 2018 06:37
Unity UI Text Gradient effect
using System.Collections.Generic;
/// <summary>
/// Modified Gradient effect script from http://answers.unity3d.com/questions/1086415/gradient-text-in-unity-522-basevertexeffect-is-obs.html
/// -Uses Unity's Gradient class to define the color
/// -Offset is now limited to -1,1
/// -Multiple color blend modes
///
/// Remember that the colors are applied per-vertex so if you have multiple points on your gradient where the color changes and there aren't enough vertices, you won't see all of the colors.
/// </summary>
@CloudyWater
CloudyWater / Starfield.shader
Created February 23, 2018 03:31
Conversion of ShaderToy to Unity Shader
Shader "Starfield"
{
Properties
{
_iMouse ("iMouse", Vector) = (0,0,0,0)
_Iterations ("Iterations", int) = 17
_Formuparam ("Formuparam", float) = .53
_Steps ("Steps", int) = 20
_StepSize ("StepSize", float) = .1
_Zoom ("Zoom", float) = .8
#!/usr/bin/env bash
[ ! -d .git ] && "This is not a git directory." && exit 1
# Setup the gource info for the repo.
~/gource/setup
# Create the video.
gource --load-config ./.git/gource/config.ini | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 8 -bf 0 ./gource.mp4
@DanMillerDev
DanMillerDev / BlendShapeObjectSwitcher.cs
Last active April 15, 2020 20:10
Unity ARKit Blend shape object activator
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.iOS;
public class BlendShapeObjectSwitcher : MonoBehaviour {
private static float THRESHOLD = 0.4f;
bool enabled = false;
@michaelybecker
michaelybecker / StackDoFAutoFocus.cs
Last active October 16, 2021 22:01
DoF AutoFocus for Unity's new postprocessing stack
// An adaptaion of Frank Otto's AutoFocus script for Unity's new PostProcessing Stack
// Original at: http://wiki.unity3d.com/index.php?title=DoFAutoFocus
// Adapted by Michael Hazani
// For more info see: http://www.michaelhazani.com/autofocus-on-whats-important
using UnityEngine;
using System.Collections;
using System;
using UnityEngine.PostProcessing;