Skip to content

Instantly share code, notes, and snippets.

@jakubtomsu
jakubtomsu / ufmt.odin
Created January 19, 2026 13:57
Extremely stripped down lightweight `core:fmt` alternative
// Micro-fmt
//
// Extremely stripped down `core:fmt` alternative.
// Supports only %s, %f, %i, %x, %%
// NOTE: curly braces don't need to be doubled ({{ and }}) like in `core:fmt`
//
// By Jakub Tomšů
package ufmt
import "base:runtime"
@tahatorabpour
tahatorabpour / README.md
Last active January 19, 2026 15:00
Blender, high performance Multithreaded Exporter (Rift exporter)

Article:

https://lotusspring.substack.com

Disclaimer!

This code was written without the intention of being publicly shared. Not much effort was put into beautification or anything like that, one big file that does it all! Some effort is requried on your part to make this compile.

Python Disclaimer!

I heavily dislike python and consider the code wasteful slop. I have very little python experience, so there are likely much better ways of writing the python portion. Exercise caution!

Encoder/Decoder System

.enc File

Data Types

Basic Types

  • bool
@runevision
runevision / BurstSDFGenerator.cs
Created September 11, 2024 07:48
Signed Distance Field generator for Unity with Burst support
/*
Based on the Anti-aliased Euclidean distance transform described by Stefan Gustavson and
Robin Strand. For further information, see https://contourtextures.wikidot.com/ and
https://web.archive.org/web/20220503051209/https://weber.itn.liu.se/~stegu/edtaa/
The algorithm is an adapted version of Stefan Gustavson's code, it inherits the copyright
statement below, which applies to this file only.
The rewrite with Unity Burst support makes the execution 40 times faster by default,
and 75 times faster if the passed in textures are both of type TextureFormat.RGBAFloat.
@laytan
laytan / renderer.odin
Last active November 2, 2025 13:45
Example Odin font renderer using fontstash and WebGPU
package vendor_wgpu_example_fontstash
import intr "base:intrinsics"
import "core:fmt"
import "core:math/linalg"
import sa "core:container/small_array"
import fs "vendor:fontstash"
import "vendor:wgpu"
@harold-b
harold-b / bgfx.odin
Created May 21, 2024 18:50
Odin bindings for bgfx
package bgfx
import "base:intrinsics"
import "base:runtime"
import cffi "core:c"
when ODIN_OS == .Linux {
@require foreign import bgfx {
"libs/windows/bgfx.a",
}
@laytan
laytan / main.odin
Last active August 21, 2025 09:44
Graphviz Odin dependencies
package main
import "core:fmt"
import "core:io"
import "core:odin/ast"
import "core:odin/parser"
import "core:os"
import "core:path/filepath"
import "core:slice"
import "core:strings"
@cshenton
cshenton / tri.c
Last active November 23, 2024 10:49
Seeing how fast a d3d11 swapchain can go.
#include <assert.h>
#include <stdio.h>
#include <time.h>
#define COBJMACROS
#include <windows.h>
#include <d3d11_1.h>
#include <d3dcompiler.h>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
@laytan
laytan / compile.sh
Last active October 30, 2025 18:23
Odin, GLFW & Vulkan boilerplate for Drawing a Triangle on https://vulkan-tutorial.com
#!/usr/bin/env sh
glslc shader.vert -o vert.spv
glslc shader.frag -o frag.spv
package main
import "core:fmt"
import "core:mem"
import "core:os"
import "core:runtime"
import "core:strconv"
import "core:sys/windows"
import "core:time"