Skip to content

Instantly share code, notes, and snippets.

View DanjelRicci's full-sized avatar
🔥
Burned out and still riding

SkyArcher DanjelRicci

🔥
Burned out and still riding
View GitHub Profile
@liamcary
liamcary / DynamicResolutionScaler.cs
Last active February 18, 2025 08:08
Dynamic Resolution for Oculus Quest with Unity 2021.3 LTS and URP 12
using System;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using UnityEngine.XR;
public class DynamicResolutionScaler : MonoBehaviour
{
[SerializeField, Range(0f, 1f)] float _minResolutionScale;
@DashW
DashW / ScreenRecorder.cs
Last active April 28, 2025 07:38
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 2, 2025 15:44
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining