Skip to content

Instantly share code, notes, and snippets.

View hammanandre's full-sized avatar

Andre Hamman hammanandre

View GitHub Profile
using Sirenix.OdinInspector;
using System;
using System.Collections.Generic;
[Serializable]
public class ConditionalObserver<T>
{
[ShowInInspector]
public T Value
{
@hammanandre
hammanandre / cool-game-programming-blogs.opml
Last active December 2, 2018 22:37 — forked from Reedbeta/cool-game-programming-blogs.opml
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Graphics, Games, Programming, and Physics Blogs</title>
</head>
<body>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="https://www.roadtovr.com"/>
<outline type="rss" text="Seattle VR" title="Seattle VR" xmlUrl="http://seattlevr.us/feed/" htmlUrl="http://seattlevr.us"/>
<outline type="rss" text="The Tech Report - News" title="The Tech Report - News" xmlUrl="http://techreport.com/news.xml" htmlUrl="https://techreport.com/"/>
@hammanandre
hammanandre / curl.md
Created October 15, 2018 18:32 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@hammanandre
hammanandre / IPoolable.cs
Last active June 6, 2018 19:11
An Object pool setup for Unity. Includes some workarounds and awkward phrasings to make Unity friendly.
public interface IPoolable
{
/// <summary>
/// Called when Gotten from Pool
/// </summary>
void Get();
/// <summary>
/// Called when Released to Pool
/// </summary>
void Release();
@hammanandre
hammanandre / ThreeDGradientNoiseVertexSampled.shader
Last active May 21, 2018 23:53
3D Gradient Noise Vertex Sampled
Shader "Noise/3D Gradient Noise Vertex Sampled"
{
Properties
{
_Octaves("Octaves", Range(0,100)) = 0.5 // Octaves ish ?NoiseScale perhaps better term
[Toggle(_RampTex_Map)]_RampTexMap("Use Ramp Map", Float) = 0 //float just used for attribute to actually work. No other Purpose
_RampTex("Ramp Texture", 2D) = "white" {}
}
SubShader
{
@hammanandre
hammanandre / TriplanarRampMappedNoise.shader
Created May 21, 2018 23:10
Triplanar Mapped Gradient Noise
Shader "Noise/Triplanar RampMapped Noise" {
Properties
{
_Octaves("Octaves", Range(0,100)) = 0.5 // Octaves ish ?NoiseScale perhaps better term
[Toggle(_RampTex_Map)]_RampTexMap("Use Ramp Map", Float) = 0 //float just used for attribute to actually work. No other Purpose
_RampTex("Ramp Texture", 2D) = "white" {}
}
SubShader
{
Tags{ "RenderType" = "Opaque" }
@hammanandre
hammanandre / LitDissolveInOut.shader
Last active April 15, 2018 12:19 — forked from benloong/UIDissolve.shader
Dissolve shader for Unity
Shader "Custom/LitDissolveInOut" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_DissolveTex("Dissolve Texture", 2D) = "white" {}
_Level("Dissolution level", Range(0.0, 1.0)) = 0.1
_EdgeColour1("Edge colour 1", Color) = (1.0, 1.0, 1.0, 1.0)
_EdgeColour2("Edge colour 2", Color) = (1.0, 1.0, 1.0, 1.0)
_Edges("Edge width", Range(0.0, 1.0)) = 0.1