Skip to content

Instantly share code, notes, and snippets.

View apples's full-sized avatar
🏳️‍🌈

Apples apples

🏳️‍🌈
View GitHub Profile
@d6e
d6e / godot_ci_cache.py
Last active February 14, 2024 10:20
Builds the godot cache by collecting all the expected godot import paths in the *.import files, then launching godot, then waiting until it populates all the expected import paths, then stopping the godot process.
import os
import subprocess
import time
import re
from pathlib import Path
# Set the path to your Godot project and Godot executable
GODOT_PROJECT_PATH = Path("myproject")
GODOT_EXECUTABLE = "godot" # or the path to your Godot executable
GODOT_LOG_FILE = Path("artifacts") / "godot_output.log" # Log file to store Godot output
@Cyanilux
Cyanilux / Renderer2DBlitTest.cs
Created November 28, 2021 13:03
Possible workaround for the 2D Renderers not allowing you to assign Renderer Features
// Possible workaround for the 2D Renderers not allowing you to assign Renderer Features yet.
// Enqueues a ScriptableRenderPass without relying on a Renderer Feature
// Used with https://github.com/Cyanilux/URP_BlitRenderFeature/blob/master/Blit.cs
public class Renderer2DBlitTest : MonoBehaviour {
public Blit.BlitSettings settings;
private Blit.BlitPass blitPass;
private void OnEnable(){
blitPass = new Blit.BlitPass(settings.Event, settings, "BlitTest");
@a3geek
a3geek / PoissonDiskSampling.cs
Last active February 28, 2024 07:37
Fast Poisson Disk Sampling for Unity.
using System.Collections.Generic;
using UnityEngine;
namespace Gists
{
// The algorithm is from the "Fast Poisson Disk Sampling in Arbitrary Dimensions" paper by Robert Bridson.
// https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf
public static class FastPoissonDiskSampling
{