Skip to content

Instantly share code, notes, and snippets.

@Nebulavenus
Nebulavenus / !ps1softwarerasterizer.md
Last active June 7, 2025 20:03
PS1-Style Software Rasterizer in Nim

PS1-Style Software Rasterizer in Nim

Reminder: This code was hallucinated as an experiment using Gemini 2.5 Pro & Flash, so please approach it with caution. I directed and controlled the process, and I also fixed the compilation errors it contained.

This project is a software rasterizer written from scratch in the Nim programming language. Its goal is to faithfully emulate the iconic visual aesthetic of the original Sony PlayStation (PS1) by implementing the specific hardware limitations and graphical tricks that defined that era.

The entire renderer is contained in a single file (ps1_rasterizer.nim) with no external dependencies, making it a clear and self-contained educational resource.

Final Render Animation

@Nebulavenus
Nebulavenus / main.odin
Created July 29, 2024 21:57
Minimal D3D11 pt3 + Odin Lang
package main
// Ported from https://gist.github.com/d7samurai/abab8a580d0298cb2f34a44eec41d39d
import "core:fmt"
import "core:mem"
import hlsl "core:math/linalg/hlsl"
import glm "core:math/linalg/glsl"
import D3D11 "vendor:directx/d3d11"