Questions tagged [instancing]
Instancing is a GPU rendering optimization where many objects using the same mesh are rendered in a single draw call, with a separate buffer containing the data that should be unique for each instance of the mesh (including its transformation matrix, and potentially other information like tinting or shader parameters).
102 questions
0
votes
1
answer
150
views
How to efficiently construct model matrices in a vertex shader from a small amount of data, for instanced rendering of many moving 3d game characters
I am trying to efficiently render many 3d game characters: many instances of the same 3d model which can change their positions and z rotations each frame. For reference I'm using OpenGL but this ...
0
votes
0
answers
282
views
Graphics.RenderMesh in update with massive loop
I have millions of objects that I want to render. I found that instantiate is not suitable, so I'm using Graphics.RenderMesh which is amazingly fast and light. But here comes the problem: it takes CPU ...
0
votes
1
answer
639
views
Is instanced rendering any different from indexing seperate buffers using div and mod in the shader?
As far as I can tell instanced rendering is simply a way to separate a single vertex buffer into a buffer for vertex-specific data and instance-specific data. This could be useful for rendering ...
0
votes
1
answer
94
views
Most but not all quads appear corrupted when passing matrix and colour using VBO for instanced rendering
I was trying to batch quads with the same texture and blend mode into the single draw call using glDrawElementsInstanced. As long as I use just a position, texture ...
0
votes
1
answer
424
views
How to draw selected instances with gl_InstanceID and glDrawElements...?
I want to draw a selected number of instances using glDrawElements... but I don't know which function to use and how to set the parameters.
I set the ...
0
votes
1
answer
462
views
Iterating through every pixel in a shader - skipping pixels
I made the below shader to draw a mesh for every pixel on a texture, and color it with that pixel.
It iterates through the pixels, correctly drawing and coloring the mesh instances. However it skips ...
0
votes
0
answers
98
views
Is there any benefit of combing Instance Meshing with quadtrees LoD?
I would like to know if there would be any benefit of combing Instance Meshing with quadtrees LoD? Besides the obvious performance improvement of only having one mesh
I wanted to try and implement ...
1
vote
0
answers
392
views
GLSL GLTF Instanced Hardware Skinning
I'm beating my head on trying to get hardware skinning going in my engine.
We're using OZZ Animation and TinyGLTF together to animate models.
The issue seems to either stem from how OZZ maps their ...
2
votes
1
answer
1k
views
Vulkan SSBO Array Of Structs
I am trying to create a Vulkan Storage Space Buffer Object which contains an array of structs for use in my vertex shader. I believe I'm missing something fundamental here because the 1st struct in ...
1
vote
1
answer
2k
views
New to Godot having problem understanding Button Group
I'm having an issue trying to understand the ButtonGroup logic, totally new to GDScript, don't have a clue of what I'm doing. Obviously is wrong.
I created a scene that I saved in a folder called &...
0
votes
1
answer
498
views
Is there any performance difference between Draw() and DrawInstanced(1)?
The background of the question is, does it make sense to introduce an if case when drawing a mesh for whether there is instancing or not?
This is using DirectX 11 ...
1
vote
0
answers
500
views
How can I instantiate an object at a certain position?
In my game, the player drives a car and when the car reaches the end of the road, I want a different road prefab to be spawned. I have multiple road prefabs, and want to be able to spawn one when the ...
0
votes
0
answers
119
views
How can I snap a mesh to the grid, on dragging it into the scene, in Unity?
I've got a game that involves voxel-like game object management. Each voxel object snaps to the integer coordinates in Unity's scene, at play time—easy enough to do in the ...
2
votes
1
answer
1k
views
deleting and re-referencing nodes with $
I want to delete a scene and re-load it. This code would fail later, because the new "CoolScene" has in fact a different name, something like "@NotSuchCoolName@34", and thus it ...
1
vote
0
answers
146
views
Why instantiated Static Mesh gets scaled in Unreal Engine 4? [closed]
Building a project in Unreal Engine 4.26 while trying to increase performance of the videogame I ended up using instances of static meshes where possible. This generated an issue:
My instantiated ...