添加插件

This commit is contained in:
2025-11-10 00:08:26 +08:00
parent 4059c207c0
commit 76f80db694
2814 changed files with 436400 additions and 178 deletions

View File

@@ -0,0 +1,33 @@
#ifndef PROCEDURAL_INCLUDED
#define PROCEDURAL_INCLUDED
#define UNITY_INDIRECT_DRAW_ARGS IndirectDrawIndexedArgs
#include "UnityIndirect.cginc"
StructuredBuffer<float4x4> _InstanceTransforms;
StructuredBuffer<float4x4> _InvInstanceTransforms;
StructuredBuffer<float4> _Colors;
#if UNITY_ANY_INSTANCING_ENABLED
// Based on :
// https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/ParticlesInstancing.hlsl
// and/or
// https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/CGIncludes/UnityStandardParticleInstancing.cginc
void vertInstancingSetup() {
}
#endif
void GetInstanceData_float(uint svInstanceID, float3 pos, out float3 outPos, out float4 color)
{
InitIndirectDrawArgs(0);
uint instanceID = GetIndirectInstanceID_Base(svInstanceID);
unity_ObjectToWorld = _InstanceTransforms[instanceID];
unity_WorldToObject = _InvInstanceTransforms[instanceID];
color = _Colors[instanceID];
outPos = pos;
}
#endif