Skip to content

Instantly share code, notes, and snippets.

View nntgam's full-sized avatar
🤜

RoadToMillionDollar nntgam

🤜
View GitHub Profile

GPU Instancing for GameObjects

frustum culling, multiple materials are being segregated into batches with their own AABB:

@Refsa
Refsa / Usage.cs
Last active June 1, 2025 02:51
DrawMeshInstancedIndirect with ShaderGraph and URP
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
class Render : MonoBehaviour
{
struct DrawData
{
public Vector3 Pos;
public Quaternion Rot;