Skip to content

Instantly share code, notes, and snippets.

View ASPePeX's full-sized avatar
🏠
Working from home

Alexander Scheurer ASPePeX

🏠
Working from home
View GitHub Profile
@ASPePeX
ASPePeX / SpriteAlphaMask.shader
Last active October 6, 2016 15:46
Unity shader to use a sprite as a transparent mask. You can for example have a animated sprite-sheet in a augmented reality scene and occlude it by real world objects.
Shader "Sprites/SpriteMask"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Cutoff("Base Alpha cutoff", Range(0,1)) = .5
}
SubShader
{
@ASPePeX
ASPePeX / texcompunity.txt
Last active November 3, 2016 14:31
Texture Compression Reminder - Unity Android
Samsung Galaxy S4 - Snapdragon 600 - ASTC
Project Tango - Tegra - DXT
--
More to come
@ASPePeX
ASPePeX / SmoothCameraFollow2D.cs
Created March 3, 2017 11:22
An easy and short script for a smooth 2D follow camera in Unity.
using UnityEngine;
public class SmoothCameraFollow2D : MonoBehaviour
{
public GameObject Target;
public float LerpValue = 0.05f;
private float _t;
private Vector3 _pos;
@ASPePeX
ASPePeX / InputJSON.cs
Last active July 20, 2017 13:30
Unity www poll script
public class InputJSON
{
public float Input;
}
Adventure Racer in the style of Monkey Island sword fights
Crypt of the Necrodancer MOBA
Deckbuilding Marble Game
@ASPePeX
ASPePeX / SpanCast.cs
Created July 24, 2018 09:30
Casting Span<T> Example - int to byte and back
using System;
using System.Runtime.InteropServices;
namespace SpanCast
{
class Program
{
static void Main(string[] args)
{
//preparing test data
using Fusee.Base.Core;
using Fusee.Serialization;
using System.IO;
namespace Fusee.Engine.Core
{
/// <summary>
/// High level serialization helper thing
/// </summary>
public static class Serializer