Skip to content

Instantly share code, notes, and snippets.

View stuw-u's full-sized avatar
🤠
yehaw

Stuwu stuw-u

🤠
yehaw
View GitHub Profile
@Cyanilux
Cyanilux / GrassInstanced.hlsl
Last active February 13, 2025 05:24
Experiments with using DrawMeshInstancedIndirect with Shader Graph
// https://twitter.com/Cyanilux/status/1396848736022802435?s=20
#ifndef GRASS_INSTANCED_INCLUDED
#define GRASS_INSTANCED_INCLUDED
// ----------------------------------------------------------------------------------
// Graph should contain Boolean Keyword, "PROCEDURAL_INSTANCING_ON", Global, Multi-Compile.
// Must have two Custom Functions in vertex stage. One is used to attach this file (see Instancing_float below),
// and another to set #pragma instancing_options :
@JimmyCushnie
JimmyCushnie / UnityGraphicsBullshit.cs
Last active February 19, 2025 10:59
Exposes some Unity URP graphics settings that are (for some stupid fucking bullshit reason) private.
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using ShadowResolution = UnityEngine.Rendering.Universal.ShadowResolution;
/// <summary>
/// Enables getting/setting URP graphics settings properties that don't have built-in getters and setters.