Skip to content

Instantly share code, notes, and snippets.

View andrew-raphael-lukasik's full-sized avatar
🏴‍☠️

Andrew Raphael Lukasik andrew-raphael-lukasik

🏴‍☠️
View GitHub Profile
@andrew-raphael-lukasik
andrew-raphael-lukasik / simd.cs
Last active December 13, 2022 11:10
my thoughts on simd and Burst
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using BurstCompile = Unity.Burst.BurstCompileAttribute;
[BurstCompile] public unsafe struct NoSimd : IJob
{
public float a, b;
public float* c;
void IJob.Execute () { *c = a * b; }
@andrew-raphael-lukasik
andrew-raphael-lukasik / .LetsCubeMarch.cs.md
Last active September 28, 2023 18:51
multi-threaded cube marching where geometry is sourced from a mesh asset template (artist-friendly)

4re4y77i96o6kjerewarezarhea323ef2

// src: https://gist.github.com/andrew-raphael-lukasik/bc05310efcb1bcb2875a376494414f36
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
public interface INativeMinHeapComparer<I,V>
where I : unmanaged
where V : unmanaged
{
int Compare ( I lhs , I rhs , NativeSlice<V> comparables );
}
// src: https://gist.github.com/andrew-raphael-lukasik/709c19dd2305a2d1a0fa32ee82717b5c
using Unity.Collections;
public unsafe struct NativeStack <T> : System.IDisposable
where T : unmanaged
{
NativeList<T> _list;
public bool IsCreated => _list.IsCreated;
public int Length => _list.Length;
@andrew-raphael-lukasik
andrew-raphael-lukasik / random projects & daily coding exercises.md
Last active September 5, 2025 10:57
random projects & daily coding exercises

random projects & daily coding exercises

AI

crowd steering

ray marching shader template

@andrew-raphael-lukasik
andrew-raphael-lukasik / ExtensionMethods_UIToolkit.cs
Last active December 18, 2025 17:31
UIToolkit, QoL extension methods that should be built-in
// src* = https://gist.github.com/andrew-raphael-lukasik/d38a11bf0559a723617b9deaeedb2eac
using UnityEngine;
using UnityEngine.UIElements;
public static class ExtensionMethods_UIToolkit
{
public static T For<T>(this VisualElement root, string name, System.Action<T> action, params string[] classes)
where T : VisualElement
{
@andrew-raphael-lukasik
andrew-raphael-lukasik / .LetsRotateAndSpawn.cs.md
Last active April 11, 2024 22:52
object orientation placement schemes

image0 image1

@andrew-raphael-lukasik
andrew-raphael-lukasik / .GridTester.cs.md
Last active September 28, 2023 18:52
grid system example

img0 img1 img2

@andrew-raphael-lukasik
andrew-raphael-lukasik / .CarsAISystem.cs.md
Last active March 26, 2024 21:51
job system for basic steering behavior at scale

img1 img2