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 January 27, 2024 12:15
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 November 3, 2024 06:02
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.