Hi guys,
currently trying to implement RenderMeshIndirect, rendering instances of a mesh.
Pretty new in this kind of field, programming C#/HLSL in general, but with some help I got it to work.
As of right no I am using a HLSL/Shader code to get it to work, but I would like to intend to use Shader Graph for this kind of stuff.
This is my current shader code: https://pastebin.com/KTYbCg6d
This is part of the C# code: https://pastebin.com/1hep4fnV (I hope I did not missed anything important here)
As far as I am aware of, injecting a GraphicsBuffer is not possible within ShaderGraph, but I found a video on Youtube, in which shich someone was bypassing this kind of stuff by using a custom function.
https://github.com/KDSBest/Render1MillionObjectsWithUnityAndShaderGraph/blob/main/Assets/Shaders/BeltInstancing.hlsl
And there I thought, well, this looks pretty similar to my problem actually.
So my quuestion is ... is this similiar to my case and if yes, could you give me a hin on how to solve this?
Unfortunately I can't find anything to this topic, also not on this discord. When searching for 'RenderMeshIndirect' in this and the coding channel, I can't find any related post ~
Thanks for the help and have a nice day 🙂
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Render 1 Million Objects with Shader Graph and Unity.
We leverage Graphics.DrawMeshInstancedIndirect and make it work in Shader Graph, which is not supported by default.
Links for Community:
Patreon: https://www.patreon.com/kdsmmorpg
Discord: https://discord.gg/GjcuUfUny7
Github: https://github.com/KDSBest/Render1MillionObjectsWithUnityAndShad...
Render 1 Million Objects with Unity and ShaderGraph. Make Graphics.DrawMeshInstancedIndirect work with ShaderGraph - KDSBest/Render1MillionObjectsWithUnityAndShaderGraph