Skip to content

Instantly share code, notes, and snippets.

View ompuco's full-sized avatar
🐏
baa

ompuco ompuco

🐏
baa
View GitHub Profile
@ompuco
ompuco / ompucoLineRaster.shader
Created March 8, 2026 03:40
A shader for better pixel-perfect line mesh rasterization in Unity, since the default behavior on most graphics platforms make for some real garbage lines, especially if you wanted to use it for a project with low-resolution graphics.
Shader "ompuco/LineRaster"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
@ompuco
ompuco / PSXDither.hlsl
Last active January 29, 2026 07:52
Color dither & truncation based on Sony's PlayStation (1) hardware features & limitations.
#ifdef PSXDTH
#else
#define PSXDTH
//PS1 Hardware Dithering & Color Precision Truncation Function
//by ompu co | Sam Blye (c) 2020
//PS1 dither table from PSYDEV SDK documentation