Skip to content

Instantly share code, notes, and snippets.

View CodeSmile-0000011110110111's full-sized avatar

CodeSmile CodeSmile-0000011110110111

View GitHub Profile
@kurtdekker
kurtdekker / BREAKOUT.cs
Created January 31, 2025 20:37
Emergency infinite loop breakout code
using UnityEngine;
// @kurtdekker - dead-simple infinite loop finder
// TODO: call BREAKOUT.Check(); from within every suspect loop.
// TODO: optionally supply a custom max callcount
public class BREAKOUT : MonoBehaviour
{
static BREAKOUT _instance;

GPU Instancing for GameObjects

frustum culling, multiple materials are being segregated into batches with their own AABB:

@Vercidium
Vercidium / greedyvoxelmeshing
Last active July 20, 2025 18:29
Greedy Voxel Meshing ported to C#
// Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
// Note this implementation does not support different block types or block normals
// The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/
const int CHUNK_SIZE = 32;
// These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,0)