I would like to “expand” a vertex position from a storage texture into a quad. Using an instanced quad as a model I would like to use glInstance_ID in a vertex shader to sample the storage texture. Is this possible in Defold? I am asking because chat-GPT keeps stating that it is not available in a vertex shader in Defold…
So I am confused…
It’s a shader construct so it should be available since we use glsl version 140+ on desktop. But you need to use instancing for this to work I guess
@jhonny.goransson Thank you!
My use case is the following. I would like to implement (at least to study the feasibility) of a GPU based particle system. I would use a compute program to update the particle data in a storage texture (and in a second moment also to spawn the particles), But then I need a way to draw a quad for each particle in the storage texture.
I would like to instance multiple times a quad mesh, once for each particle. And then use glInstance_ID as as index in the storage texture. But my problem in this approach is: how to instanciate 100K times a mesh? I don’t want to have 100K model components in the scene…
Any suggestion?
Thanks again.