Skip to content

Instantly share code, notes, and snippets.

@ompuco
ompuco / PSXDither.hlsl
Last active February 10, 2024 10:54
Color dither & truncation based on Sony's PlayStation (1) hardware features & limitations.
#ifdef PSXDTH
#else
#define PSXDTH
//PS1 Hardware Dithering & Color Precision Truncation Function
//by ompu co | Sam Blye (c) 2020
//PS1 dither table from PSYDEV SDK documentation
@fasterthanlime
fasterthanlime / the-point-then.md
Created July 10, 2017 09:08
You don't even get Steam keys? Jeez, what's the point then?

I'm so glad you asked!

Buying on itch.io:

  • Supports creators - our default cut is 10%, but they can pick any.
  • Lets you play the games you buy, DRM-free, whether you want to use our desktop client or not.

Many platforms out there are fighting for the "best Steam key reseller" title, which often means "the cheapest", and some are famously known for not caring whether said keys were acquired legitimately or not.

(Keep in mind that key reselling is something Valve allows because having more players now means more revenue later. If/when it stops being economically viable for them, they'll have no reason to keep allowing that. Those platforms might have to rethink their model then.)

@ntratcliff
ntratcliff / WebWindow.cs
Last active May 19, 2017 15:59
Utility class for displaying a webpage in the Unity Editor. Supports Unity 5.0+
using UnityEngine;
using UnityEditor;
using System;
using System.Reflection;
/// <summary>
/// Displays a webpage in the editor.
/// </summary>
public class WebWindow : ScriptableObject
{
@LotteMakesStuff
LotteMakesStuff / EditorCoroutineRunner.cs
Last active May 20, 2022 10:21
Run stuff in the editor with all the convenience of co-routines! Add a status UI super easily to see readouts what your long running code is actually doing! nice~ There is a short API demo at the top of the class. This is a prefect companion for my inspector buttons https://gist.github.com/LotteMakesStuff/dd785ff49b2a5048bb60333a6a125187
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
public class EditorCoroutineRunner
{
[MenuItem("Window/Lotte's Coroutine Runner: Demo")]
@LotteMakesStuff
LotteMakesStuff / Colors.cs
Created April 6, 2017 23:45
Trying to set Colours from code but need something better than the few that unity provide and dont wanna mess around with colour values for ages? Colors is your friend!!!
using UnityEngine;
public class Colors
{
// NOTE: The follwing color names come from the CSS3 specification, Section 4.3 Extended Color Keywords
// http://www.w3.org/TR/css3-color/#svg-color
public static readonly Color AliceBlue = new Color32(240,248,255,255);
public static readonly Color AntiqueWhite = new Color32(250,235,215,255);
public static readonly Color Aqua= new Color32(0,255,255,255);
@t0chas
t0chas / CustomEditorBase.cs
Last active March 5, 2024 16:47
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
@KeyMaster-
KeyMaster- / polarWarp.glsl
Last active November 20, 2019 15:00
Luxe polar warp shader
//The source texture that will be transformed
uniform sampler2D tex0;
//The texture coordinate passed in from the vertex shader (the default luxe vertex shader is suffice)
varying vec2 tcoord;
//x: width of the texture divided by the radius that represents the top of the image (normally screen width / radius)
//y: height of the texture divided by the radius representing the top of the image (normally screen height / radius)
uniform vec2 sizeOverRadius;
@formix
formix / xd2md.cs
Last active January 17, 2024 21:13
Generates Markdown From VisualStudio XML documentation files
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace Formix.Utils
{
class Program
@golergka
golergka / 1.cs
Last active August 29, 2015 14:05 — forked from cuppster/1.cs
/*
modified from original source: https://bitbucket.org/mattkotsenas/c-promises/overview
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Promises
@lontivero
lontivero / gist:593fc51f1208555112e0
Last active June 24, 2023 20:05
Generates Markdown from VS XML documentation file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace GithubWikiDoc
{