Skip to content

Instantly share code, notes, and snippets.

View ben-perry's full-sized avatar
🎯
Focusing

Pezza ben-perry

🎯
Focusing
View GitHub Profile
@ben-perry
ben-perry / PropulsionEffects.cs
Created October 31, 2019 14:59
An example of how I initially create systems in unity to avoid allocations and keep data contiguous in memory. Prevents external code becoming dependent on its memory layout and should be easy utilize the Unity Job System when needed.
using UnityEngine;
namespace YourGame
{
public struct PropulsionEffectHandle
{
int _index;
int _generation;
public int Index => _index;
@ben-perry
ben-perry / CustomGUI.shader
Last active October 31, 2019 14:41
An implementation of "Sharper Mipmapping using Shader Based Supersampling" for Unity
Shader "Custom/GUI"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Texture", Any) = "white" {}
}
SubShader
{