Skip to content

Instantly share code, notes, and snippets.

@ssell
ssell / FrustumPlanes.cs
Last active January 17, 2022 05:36
Implementation of a Unity ECS instanced Sprite renderer with basic frustum culling.
using Unity.Mathematics;
using Unity.Rendering;
using UnityEngine;
namespace Realms
{
/// <summary>
/// Based on Unity.Rendering.FrustumPlanes since those aren't public for some reason.
/// </summary>
public struct FrustumPlanes
@JoeCoo7
JoeCoo7 / Components
Last active January 20, 2020 19:45
Component Transform with Scale
using Unity.Entities;
using Unity.Mathematics;
//----------------------------------------------------------------------------------------
[System.Serializable]
public struct ModelMatrix : IComponentData
{
public float4x4 Value
}
public class ModelMatrixComponent : ComponentDataWrapper<ModelMatrix> { }
@xanathar
xanathar / EventHandlers in MoonSharp
Created December 12, 2014 20:44
Sample of event handlers in MoonSharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MoonSharp.Interpreter;
namespace PerformanceComparison
{
class Sample