Skip to content

Instantly share code, notes, and snippets.

View sketchpunk's full-sized avatar
🏠
Working from home

Pedro sketchpunk

🏠
Working from home
View GitHub Profile
@williamchange
williamchange / tri_voronoi.hlsl
Last active February 21, 2023 15:51
Triangle Voronoi Borders HLSL UE (Custom Node)
// Based on "Triangle Voronoi Borders" by Thomas Hooper (@tdhooper)
// https://www.shadertoy.com/view/ss3fW4
struct Functions
{
float3 sdTriEdges(float2 p) {
return float3(
dot(p, float2(0.,-1.)),
dot(p, float2(.866025, .5)),
dot(p, float2(-.866025, .5))
);
@antonkudin
antonkudin / pipeGenerator.cs
Created September 26, 2023 13:48
Generates pipe mesh from mesh segments
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class pipeGenerator : MonoBehaviour
{
[SerializeField] Mesh straightMesh;
[SerializeField] Mesh elbowMesh;
[Space]
[SerializeField] Vector3[] pathPoints;
@FreyaHolmer
FreyaHolmer / GpuPrinter.cginc
Last active May 24, 2025 08:58
A unity shader .cginc to draw numbers in the fragment shader - see the first comment below for example usage!
///////////////////////////////////////////////////////////////////////////////
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader
// AUTHOR: Freya Holmér
// LICENSE: Use for whatever, commercial or otherwise!
// Don't hold me liable for issues though
// But pls credit me if it works super well <3
// LIMITATIONS: There's some precision loss beyond 3 decimal places
// CONTRIBUTORS: yes please! if you know a more precise way to get
// decimal digits then pls lemme know!
// GetDecimalSymbolAt() could use some more love/precision
@kenjinp
kenjinp / NOAAColorRamp.ts
Created February 25, 2025 08:20
This is the color schema I use in https://geomancer.kenny.wtf/
export const noaaRamp = [
{ color: "#ffffff", elevation: 8000 },
{ color: "#E0D7D0", elevation: 4000 },
{ color: "#CDB99C", elevation: 2000 },
{ color: "#BA9468", elevation: 1000 },
{ color: "#9B7E43", elevation: 500 },
{ color: "#75752D", elevation: 250 },
{ color: "#456C18", elevation: 50 },
{ color: "#175515", elevation: 10 },
{ color: "#004023", elevation: 0.1 },