Skip to content

Instantly share code, notes, and snippets.

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

JT5D JT5D

💭
Multiversing...
View GitHub Profile
@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;
@t04glovern
t04glovern / GPSController.cs
Created April 30, 2017 12:55
Unity3D GPS Connector script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GPSController : MonoBehaviour {
public LocationInfo currentGPSInfo;
public float updateRate = 3f;
public bool debugging = true;
using UnityEngine;
public class AsteroidSpawner : MonoBehaviour
{
public int count = 10;
public GameObject prefab;
private void Start()
{
for (int i = 0; i < count; i++)
@runewake2
runewake2 / DeformableMesh.cs
Created December 21, 2016 04:42
Physically simulated mesh deformation. This file handles the mesh updates.
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[RequireComponent(typeof(GeneratePlaneMesh))]
public class DeformableMesh : MonoBehaviour {
public float maximumDepression;
public List<Vector3> originalVertices;
@valryon
valryon / Extruder.cs
Created November 18, 2016 13:25
Extrude a 2D sprite to a mesh from a Polygon Collider in Unity3D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
///
/// </summary>
/// <remarks>Source: https://forum.unity3d.com/threads/trying-extrude-a-2d-polygon-to-create-a-mesh.102629/ </remarks>
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer), typeof(PolygonCollider2D))]
public class ExtrudeSprite : MonoBehaviour
@emrahgunduz
emrahgunduz / WebImageDownloader.cpp
Last active January 25, 2023 21:15
Web Image Downloader For Unreal Engine 4 -- Do not forget to change the include and API key in your own classs, if you simply copy-pasting this.
// (c) 2016 Markakod
#include "HitMe.h"
#include "WebImageDownloader.h"
UWebImageDownloader* UWebImageDownloader::GetWebImageDownloader(FString WebImageName, FString URL, bool& IsValid)
{
IsValid = false;
UWebImageDownloader *Object = NewObject<UWebImageDownloader>();
@michidk
michidk / OutlineShader.shader
Last active May 28, 2024 17:13
An outline shader made for Unity with the help of @OverlandGame. It adjusts the size of the outline to automatically accomodate screen width and camera distance.
// An outline shader made for Unity with the help of @OverlandGame by @miichidk
// It adjusts the size of the outline to automatically accomodate screen width and camera distance.
// See how it looks here: https://twitter.com/OverlandGame/status/791035637583388672
// How to use: Create a material which uses this shader, and apply this material to any meshrenderer as second material.
Shader "OutlineShader"
{
Properties
{
_Width ("Width", Float ) = 1
_Color ("Color", Color) = (1,1,1,1)