Skip to content

Instantly share code, notes, and snippets.

View rrazgriz's full-sized avatar
💟

Raz rrazgriz

💟
View GitHub Profile
@pema99
pema99 / QuadIntrinsics.cginc
Last active July 19, 2025 11:31
Emulated Quad and Wave intrinsics for basic fragment shaders
// SPDX-License-Identifier: MIT
// Author: pema99
// This file contains functions that simulate Quad and Wave Intrinsics without access to either.
// For more information on those, see: https://github.com/Microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics
// To use the functions, you must call SETUP_QUAD_INTRINSICS(pos) at the start of your fragment shader,
// where 'pos' is the pixel position, ie. the fragment input variable with the SV_Position semantic.
// Note that some functions will require SM 5.0, ie. #pragma target 5.0.
@hyblocker
hyblocker / README.md
Last active May 12, 2024 11:06
Unity Docs Syntax Highlighting

Here is what I learned about unity skinned meshes and blendshapes and how they are dealt with on the GPU.
I use Nvidia Nsight Graphics to profile performance and read buffer sizes on GPU. Performance numbers are for a 4090 clocked at 2310 MHz core and stock memory. Unity version is 2019.4.31f1

TLDR

For Unity 2019 Split meshes with blendshapes into two meshes, one for blendshapes and one without.

This does not help much with the memory usage, but it does help a lot with performance. The only VRAM savings is one less copy of POSITION, NORMAL, TANGENT.

For Unity 2021+ merge skinned meshes regardless of if they have blendshapes. No more extra copies and it always uses a fast compute shader now for the bone skinning.

@PiMaker
PiMaker / Phalanx.cs
Last active June 9, 2024 13:57
Avatar Phalanx - A way to upload multiple versions of a VRChat avatar with a single click
/*
Made by _pi_ in VRChat/@pimaker on GitHub
Usage:
* Make an empty GameObject
* "Add Component" a Phalanx
* Drop in your Avatar Descriptor
* Click "Get Data From Avatar"
* Get your Avatar ID from the pipeline component beneath the avatar descriptor
* Optionally: Set up a thumbnail and an overlay text to superimpose onto it dynamically
@mmozeiko
mmozeiko / unitypackage2zip.py
Created February 9, 2019 12:31
Python script that converts .unitypackage file to .zip archive
#!/usr/bin/env python3
import sys
import tarfile
import zipfile
from pathlib import Path
src = sys.argv[1]
dst = Path(src).name + ".zip"
@ZimM-LostPolygon
ZimM-LostPolygon / UnityGuidRegenerator.cs
Last active June 3, 2024 07:38
Unity asset GUIDs regenerator
// Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
namespace UnityGuidRegenerator {
public class UnityGuidRegeneratorMenu {